diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-09-28 16:20:55 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-09-28 16:20:55 +0000 |
commit | 0cce47f15f21f59ec77de41c76cf13eb2b2f4f74 (patch) | |
tree | 73dacf3105fb598058714ccad769e3b86b8b558f /modules/node/node.module | |
parent | 17c921259f61daac6cc0d10ea145d6882ea89514 (diff) | |
download | brdo-0cce47f15f21f59ec77de41c76cf13eb2b2f4f74.tar.gz brdo-0cce47f15f21f59ec77de41c76cf13eb2b2f4f74.tar.bz2 |
- 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 <form>-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)!
Diffstat (limited to 'modules/node/node.module')
-rw-r--r-- | modules/node/node.module | 18 |
1 files changed, 6 insertions, 12 deletions
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 .= "<form action=\"$REQUEST_URI\" method=\"POST\">\n"; $output .= " <input size=\"50\" value=\"". check_form($keys) ."\" name=\"keys\" type=\"text\">\n"; $output .= " <select name=\"type\">$options</select>\n"; $output .= " <input type=\"submit\" value=\"Search\">\n"; - $output .= "</form>\n"; - return $output; + return form($output); } function node_edit($node) { |