Project

General

Profile

Revision 7b2d1845

Added by Assos Assos almost 4 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/webform/webform.api.php
515 515
      // This component may be toggled as required or not. Defaults to TRUE.
516 516
      'required' => TRUE,
517 517

  
518
      // Store data in database. Defaults to TRUE. When FALSE, submission data
519
      // will never be saved. This is for components like fieldset, markup, and
520
      // pagebreak which do not collect data.
521
      'stores_data' => TRUE,
522

  
518 523
      // This component supports a title attribute. Defaults to TRUE.
519 524
      'title' => FALSE,
520 525

  
......
782 787
 *   Keys and titles for default submission information.
783 788
 *
784 789
 * @see hook_webform_results_download_submission_information_data()
790
 * @see hook_webform_results_download_submission_information_info_alter()
785 791
 */
786 792
function hook_webform_results_download_submission_information_info() {
787 793
  return array(
......
790 796
  );
791 797
}
792 798

  
799
/**
800
 * Alter fields in submission data downloads.
801
 *
802
 * @param array $submission_information
803
 *   Keys and titles for default submission information.
804
 *
805
 * @see hook_webform_results_download_submission_information_info()
806
 */
807
function hook_webform_results_download_submission_information_info_alter(array &$submission_information) {
808
  // Unset a property to remove it from submission data downloads.
809
  if (isset($submission_information['webform_ip_address'])) {
810
    unset($submission_information['webform_ip_address']);
811
  }
812
}
813

  
793 814
/**
794 815
 * Return values for submission data download fields.
795 816
 *
......
833 854
function hook_webform_download_sids_query_alter(&$query) {
834 855
  global $user;
835 856

  
836
  // check if component value matches a node ID and author of that node.
857
  // Check if component value matches a node ID and author of that node.
837 858
  $query->join('webform_submitted_data', 'wsd', 'ws.sid = wsd.sid');
838 859
  $query->condition('wsd.cid', 2);
839 860
  $query->join('node', 'n', 'wsd.data = n.nid');

Also available in: Unified diff