Project

General

Profile

Revision 01f36513

Added by Assos Assos about 6 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/webform/includes/webform.submissions.inc
2 2

  
3 3
/**
4 4
 * @file
5
 * Submission handling functions.
6
 *
5 7
 * This file is loaded when handling submissions, either submitting new,
6 8
 * editing, or viewing. It also contains all CRUD functions for submissions.
7 9
 *
......
54 56
 * @return object
55 57
 *   A new submission object, possibly for preview
56 58
 */
57
function webform_submission_create($node, $account, $form_state, $is_preview = FALSE, $prototype = NULL) {
59
function webform_submission_create($node, $account, array $form_state, $is_preview = FALSE, $prototype = NULL) {
58 60
  $data = webform_submission_data($node, $form_state['values']['submitted']);
59 61
  if (is_object($prototype)) {
60 62
    $submission = clone $prototype;
......
89 91
 * @param $submission
90 92
 *   The webform submission object to be saved into the database.
91 93
 *
92
 * @return
94
 * @return int
93 95
 *   The existing submission SID.
94 96
 */
95 97
function webform_submission_update($node, $submission) {
......
139 141
 * @param $submission
140 142
 *   The webform submission object to be saved into the database.
141 143
 *
142
 * @return
144
 * @return int
143 145
 *   The new submission SID.
144 146
 */
145 147
function webform_submission_insert($node, $submission) {
......
417 419
  drupal_set_title(webform_submission_title($node, $submission));
418 420

  
419 421
  // Keep the NID and SID in the same location as the webform_client_form().
420
  // This helps mollom identify the same fields when deleting a submission.
421 422
  $form['#tree'] = TRUE;
422 423
  $form['details']['nid'] = array(
423 424
    '#type' => 'value',
......
609 610
 *
610 611
 * @throws Exception
611 612
 */
612
function theme_webform_submission_resend($variables) {
613
function theme_webform_submission_resend(array $variables) {
613 614
  $form = $variables['form'];
614 615

  
615 616
  $header = array(t('Send'), t('E-mail to'), t('Subject'));
......
724 725
 *   Optional. The number of submissions to include in the results.
725 726
 *
726 727
 * @return QueryExtendableInterface|SelectQueryInterface
728
 *   The query object.
727 729
 */
728 730
function webform_get_submissions_query($filters = array(), $header = NULL, $pager_count = 0) {
729 731
  if (!is_array($filters)) {
......
902 904
 *   Optional; NULL for all, truthy for drafts only, falsy for completed only.
903 905
 *   The default is completed submissions only.
904 906
 *
905
 * @return
906
 *   An integer value of the number of submissions.
907
 * @return int
908
 *   The number of submissions.
907 909
 */
908 910
function webform_get_submission_count($nid, $uid = NULL, $is_draft = 0) {
909 911
  $counts = &drupal_static(__FUNCTION__);

Also available in: Unified diff