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/aggregator.module | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'modules/aggregator.module') diff --git a/modules/aggregator.module b/modules/aggregator.module index 55f321f9e..d3d1af4ce 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -232,7 +232,6 @@ function import_save_item($edit) { } function import_form_bundle($edit = array()) { - global $REQUEST_URI; $form .= form_textfield("Title", "title", $edit[title], 50, 64, "The name of the bundle."); $form .= form_textfield("Attributes", "attributes", $edit[attributes], 50, 128, "A comma-seperated list of keywords describing the bundle."); @@ -244,7 +243,7 @@ function import_form_bundle($edit = array()) { $form .= form_hidden("bid", $edit[bid]); } - return form($REQUEST_URI, $form); + return form($form); } function import_save_bundle($edit) { @@ -262,7 +261,6 @@ function import_save_bundle($edit) { } function import_form_feed($edit = array()) { - global $REQUEST_URI; $period = array(900 => format_interval(900), 1800 => format_interval(1800), 3600 => format_interval(3600), 7200 => format_interval(7200), 10800 => format_interval(10800), 21600 => format_interval(21600), 32400 => format_interval(32400), 43200 => format_interval(43200), 64800 => format_interval(64800), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600), 2419200 => format_interval(2419200)); @@ -282,7 +280,7 @@ function import_form_feed($edit = array()) { $form .= form_hidden("fid", $edit[fid]); } - return form($REQUEST_URI, $form); + return form($form); } function import_save_feed($edit) { @@ -339,16 +337,14 @@ function import_view() { } function import_fd_form() { - global $REQUEST_URI; $form .= form_textfield("Feed directory file", "url", "http://", 64, 128, "The fully-qualified URL of the feed directory file."); $form .= form_submit("Collect feeds"); - return form($REQUEST_URI, $form); + return form($form); } function import_fd_collect($edit) { - global $REQUEST_URI; set_time_limit(180); @@ -365,8 +361,6 @@ function import_fd_collect($edit) { $items = explode("", $data); - $output .= "\n"; - foreach ($items as $item) { unset ($link, $title); @@ -385,9 +379,8 @@ function import_fd_collect($edit) { } $output .= "\n"; - $output .= "
"; - return $output; + return form($output); } else { print status("failed to open '$edit[url]': $errstr."); @@ -403,11 +396,9 @@ function import_fd_import($edit) { } function import_tag() { - global $REQUEST_URI; $result = db_query("SELECT i.*, f.title AS feed FROM item i LEFT JOIN feed f ON i.fid = f.fid ORDER BY i.iid DESC LIMIT 50"); - $output .= "
\n"; $output .= "\n"; $output .= " \n"; while ($item = db_fetch_object($result)) { @@ -415,9 +406,8 @@ function import_tag() { } $output .= "
timefeeditem
\n"; $output .= "\n"; - $output .= "
\n"; - return $output; + return form($output); } function import_admin() { -- cgit v1.2.3