? patch.patch
Index: webform.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform.module,v
retrieving revision 1.124
diff -u -p -r1.124 webform.module
--- webform.module	15 Mar 2008 01:03:29 -0000	1.124
+++ webform.module	19 Dec 2008 11:03:28 -0000
@@ -127,14 +127,20 @@ function webform_menu() {
   // Node component forms.
   $items['node/%webform_menu/edit/components/%webform_menu_component'] = array(
     'page arguments' => array('webform_component_edit_form', 1, 4),
+    'access callback' => 'node_access',
+    'access arguments' => array('update', 1),
     'type' => MENU_LOCAL_TASK,
   );
   $items['node/%webform_menu/edit/components/%webform_menu_component/clone'] = array(
     'page arguments' => array('webform_component_edit_form', 1, 4, TRUE),
+    'access callback' => 'node_access',
+    'access arguments' => array('update', 1),
     'type' => MENU_LOCAL_TASK,
   );
   $items['node/%webform_menu/edit/components/%webform_menu_component/delete'] = array(
     'page arguments' => array('webform_component_delete_form', 1, 4),
+    'access callback' => 'node_access',
+    'access arguments' => array('update', 1),
     'type' => MENU_LOCAL_TASK,
   );
 
@@ -153,6 +159,9 @@ function webform_menu() {
     'title' => 'Submissions',
     'page callback' => 'webform_results_submissions',
     'page arguments' => array(1),
+    'access callback' => 'user_access',
+    'access arguments' => array('access webform results'),
+    'file' => 'webform_report.inc',
     'weight' => 4,
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
@@ -160,6 +169,9 @@ function webform_menu() {
     'title' => 'Analysis',
     'page callback' => 'webform_results_analysis',
     'page arguments' => array(1),
+    'access callback' => 'user_access',
+    'access arguments' => array('access webform results'),
+    'file' => 'webform_report.inc',
     'weight' => 5,
     'type' => MENU_LOCAL_TASK,
   );
@@ -167,6 +179,9 @@ function webform_menu() {
     'title' => 'Table',
     'page callback' => 'webform_results_table',
     'page arguments' => array(1),
+    'access callback' => 'user_access',
+    'access arguments' => array('access webform results'),
+    'file' => 'webform_report.inc',
     'weight' => 6,
     'type' => MENU_LOCAL_TASK,
   );
@@ -174,6 +189,9 @@ function webform_menu() {
     'title' => 'Download',
     'page callback' => 'webform_results_download',
     'page arguments' => array(1),
+    'access callback' => 'user_access',
+    'access arguments' => array('access webform results'),
+    'file' => 'webform_report.inc',
     'weight' => 7,
     'type' => MENU_LOCAL_TASK,
   );
@@ -183,6 +201,7 @@ function webform_menu() {
     'page arguments' => array('webform_results_clear_form', 1),
     'access callback' => 'user_access',
     'access arguments' => array('clear webform results'),
+    'file' => 'webform_report.inc',
     'weight' => 8,
     'type' => MENU_LOCAL_TASK,
   );
@@ -200,6 +219,7 @@ function webform_menu() {
     'title' => 'View',
     'page callback' => 'webform_client_form_load',
     'page arguments' => array(1, 3, FALSE, FALSE),
+    'access callback' => 'webform_submission_access',
     'access arguments' => array(1, 3, 'view'),
     'weight' => 0,
     'type' => MENU_DEFAULT_LOCAL_TASK,
@@ -208,15 +228,18 @@ function webform_menu() {
     'title' => 'Edit',
     'page callback' => 'webform_client_form_load',
     'page arguments' => array(1, 3, TRUE, FALSE),
+    'access callback' => 'webform_submission_access',
     'access arguments' => array(1, 3, 'edit'),
     'weight' => 1,
     'type' => MENU_LOCAL_TASK,
   );
   $items['node/%webform_menu/submission/%webform_menu_submission/delete'] = array(
     'title' => 'Delete',
-    'page callback' => 'webform_client_form_load',
+    'page callback' => 'drupal_get_form',
     'page arguments' => array('webform_submission_delete_form', 1, 3),
+    'access callback' => 'webform_submission_access',
     'access arguments' => array(1, 3, 'delete'),
+    'file' => 'webform_submissions.inc',
     'weight' => 2,
     'type' => MENU_LOCAL_TASK,
   );
Index: webform_submissions.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/webform/webform_submissions.inc,v
retrieving revision 1.6
diff -u -p -r1.6 webform_submissions.inc
--- webform_submissions.inc	14 Mar 2008 23:47:48 -0000	1.6
+++ webform_submissions.inc	19 Dec 2008 11:03:28 -0000
@@ -86,7 +86,7 @@ function webform_results_clear($nid) {
  * @param $nid
  *   ID of node for which to clear submissions.
  */
-function webform_results_clear_form($node) {
+function webform_results_clear_form(&$form_state, $node) {
   drupal_set_title(t("Clear Form Submissions"));
 
   $form = array();
@@ -115,7 +115,7 @@ function webform_results_clear_form_subm
  * @param $submission
  *   The submission to be deleted (from webform_submitted_data).
  */
-function webform_submission_delete_form($node, $submission) {
+function webform_submission_delete_form(&$form_state, $node, $submission) {
   $nid = $node->nid;
   $sid = $submission['sid'];
 
