Project

General

Profile

Revision 8d02775b

Added by Assos Assos about 4 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/webform/webform.api.php
820 820
  }
821 821
}
822 822

  
823
/**
824
 * Alter the query that will produce the list of submission IDs to be
825
 * downloaded.
826
 *
827
 * @param object $query
828
 *   The query object that is being built up to provide the list of submission
829
 *   IDs.
830
 *
831
 * @see webform_download_sids_query()
832
 */
833
function hook_webform_download_sids_query_alter(&$query) {
834
  global $user;
835

  
836
  // check if component value matches a node ID and author of that node.
837
  $query->join('webform_submitted_data', 'wsd', 'ws.sid = wsd.sid');
838
  $query->condition('wsd.cid', 2);
839
  $query->join('node', 'n', 'wsd.data = n.nid');
840
  $query->condition('n.uid', $user->uid);
841
}
842

  
823 843
/**
824 844
 * @}
825 845
 */
......
876 896
 *   The form state array.
877 897
 *
878 898
 * @return array
879
 *   An array of form items to be displayed on the edit component page
899
 *   Return $form with whatever changes are desired.
880 900
 */
881
function _webform_edit_component(array $component, array &$form, array &$form_state) {
901
function _webform_edit_component(array $component, array $form, array $form_state) {
882 902
  // Disabling the description if not wanted.
883 903
  $form['description']['#access'] = FALSE;
884 904

  

Also available in: Unified diff