From 0cce47f15f21f59ec77de41c76cf13eb2b2f4f74 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 28 Sep 2001 16:20:55 +0000 Subject: - fixed small glitch in node_del() - fixed small glitch in comment_del() - changed the API of the form() function. The first parameter, the "action"-attribute in the
-tag has been made optional. By default, it will be set to "$REQUEST_URI". Why? Because in 98% of the cases we would do: global $REQUEST_URI; $form = form($REQUEST_URI, $form_content); while we can do: $form = form($form_content); now. Update your modules (and sorry for the inconvenience)! --- modules/node/node.module | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'modules/node') diff --git a/modules/node/node.module b/modules/node/node.module index e856a17ec..1b0c9f123 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -142,7 +142,7 @@ function node_edit_option($id) { $form .= form_hidden("nid", $node->nid); $form .= form_submit("Save node"); - return form("admin.php?mod=node&id=$node->nid", $form); + return form($form, "post", "admin.php?mod=node&id=$node->nid"); } function node_edit_attribute($id) { @@ -155,12 +155,10 @@ function node_edit_attribute($id) { $form .= form_hidden("nid", $node->nid); $form .= form_submit("Save node"); - return form("admin.php?mod=node&id=$node->nid", $form); + return form($form, "post", "admin.php?mod=node&id=$node->nid"); } function node_edit_status($id) { - global $REQUEST_URI; - $node = node_get_object(array("nid" => $id)); $form .= form_item("Title", check_output($node->title)); @@ -172,7 +170,7 @@ function node_edit_status($id) { $form .= form_hidden("nid", $node->nid); $form .= form_submit("Save node"); - return form($REQUEST_URI, $form); + return form($form); } function node_edit_content($edit, $type) { @@ -198,7 +196,7 @@ function node_delete_confirmation($id) { $form .= form_submit("Delete node"); $form .= form_submit("Keep node"); - return form("admin.php?mod=node&id=$node->nid", $form); + return form($form, "post", "admin.php?mod=node&id=$node->nid"); } @@ -238,7 +236,6 @@ function node_listing($queries) { } function node_setting() { - global $REQUEST_URI; $threshold_post = array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 20 => 20, 25 => 25, 30 => 30, 35 => 35, 40 => 40, 45 => 45, 50 => 50, 60 => 60, 70 => 70, 80 => 80, 90 => 90, 100 => 100); $threshold_dump = array(-1 => -1, -2 => -2, -3 => -3, -4 => -4, -5 => -5, -6 => -6, -7 => -7, -8 => -8, -9 => -9, -10 => -10, -11 => -11, -12 => -12, -13 => -13, -14 => -14, -15 => -15, -20 => -20, -25 => -25, -30 => -30); @@ -259,7 +256,7 @@ function node_setting() { $form .= form_submit("Save settings"); $form .= form_submit("Reset to defaults"); - return form($REQUEST_URI, $form); + return form($form); } function node_admin_save($edit) { @@ -278,7 +275,6 @@ function node_admin_save($edit) { } function node_module_find() { - global $REQUEST_URI; foreach (module_list() as $name) { if (module_hook($name, "user")) { @@ -286,13 +282,11 @@ function node_module_find() { } } - $output .= "\n"; $output .= " \n"; $output .= " \n"; $output .= " \n"; - $output .= "
\n"; - return $output; + return form($output); } function node_edit($node) { -- cgit v1.2.3