? .svn ? p_219181_editown.patch ? p_238958_typos.patch ? p_239336_pagebreak.patch ? p_239751_throttle.patch ? components/.svn ? po/.svn Index: webform.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v retrieving revision 1.113.2.70.2.30 diff -u -p -r1.113.2.70.2.30 webform.module --- webform.module 21 Mar 2008 23:46:54 -0000 1.113.2.70.2.30 +++ webform.module 28 Mar 2008 15:30:27 -0000 @@ -839,10 +839,20 @@ function webform_view(&$node, $teaser = } } - $output = drupal_get_form('webform_client_form_'. $node->nid, $node, $submission, $enabled, $preview); + // check if the user can add another submission. + if ($node->webform['submit_limit'] != '-1') { // -1: submissions are never throttled. + include_once(drupal_get_path('module', 'webform') ."/webform_submissions.inc"); + if ($violation_count = _webform_submission_limit_check($node)) { + drupal_set_message(t("You may not submit another entry at this time."), 'error'); + $submission_throttled = 1; // checked below before rendering of form. + } + } + + if (!$submission_throttled) { // show the form, but only if the user can submit another right now. + $output = drupal_get_form('webform_client_form_'. $node->nid, $node, $submission, $enabled, $preview); + } - // Remove the surrounding