diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-02-20 22:44:51 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-02-20 22:44:51 +0000 |
commit | 277ceae5150ccf3082ca99e73a82da58814ebaf5 (patch) | |
tree | 6f2cbb14ff94893dcbb6603ce47785e41f62c869 /modules/cloud.module | |
parent | 53deeb188a5b3d8158b9fa4f05c1b99c773820f1 (diff) | |
download | brdo-277ceae5150ccf3082ca99e73a82da58814ebaf5.tar.gz brdo-277ceae5150ccf3082ca99e73a82da58814ebaf5.tar.bz2 |
- New menu houskeeping. Prototyped by Zbynek.
The following modules need updating:
* glossary module
* feed module (Breyten's version)
* mailhandler module
* notify module
* project module
* smileys module
* admin module
* style module
* taxonomy_dhtml module
To avoid unexpected problems menu_add() is deprecated (it will print an
error message when used) and menu() should be used instead.
Diffstat (limited to 'modules/cloud.module')
-rw-r--r-- | modules/cloud.module | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/modules/cloud.module b/modules/cloud.module index affdf852d..fbfdc2501 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -40,11 +40,12 @@ function cloud_link($type) { } if ($type == "admin" && user_access("administer site cloud")) { - $cloud = "The cloud monitor tracks or crawls other interesting websites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content."; + $help["general"] = "The cloud monitor tracks or crawls other interesting websites and displays their last modification dates. Visitors to the host site learn about relevant sites and can easily see if there is new content."; - menu_add("blogrolling", url("admin/cloud"), "Maintain the sites in your blogroll.", $cloud, NULL, 3); - menu_add("add new site", url("admin/cloud/add"), "Add a new sites to your blogroll.", NULL, "blogrolling", 3); - menu_add("help", url("admin/cloud/help"), "More information about the site cloud.", NULL, "blogrolling", 9); + menu("admin/syndication", "content syndication", NULL, NULL, 5); + menu("admin/syndication/cloud", "blogrolling", "cloud_admin", $help["general"]); + menu("admin/syndication/cloud/add", "add new site", "cloud_admin", $help["general"]); + menu("admin/syndication/cloud/help", "help", "cloud_help", NULL, 9); } return $links ? $links : array(); @@ -57,11 +58,11 @@ function cloud_update($site) { */ if (!ereg("^http://|https://|ftp://", $site["link"])) { - watchdog("warning", "cloud: invalid or missing URL for '". $site["name"] ."'", l(t("edit site"), "admin/cloud/edit/". $site["sid"])); + watchdog("warning", "cloud: invalid or missing URL for '". $site["name"] ."'", l(t("edit site"), "admin/syndication/cloud/edit/". $site["sid"])); } if (!ereg("^http://|https://|ftp://", $site["feed"])) { - watchdog("warning", "cloud: invalid or missing URL to monitor for '". $site["name"] ."'", l(t("edit site"), "admin/cloud/edit/". $site["sid"])); + watchdog("warning", "cloud: invalid or missing URL to monitor for '". $site["name"] ."'", l(t("edit site"), "admin/syndication/cloud/edit/". $site["sid"])); } /* @@ -126,7 +127,7 @@ function cloud_display() { $header = array(t("site"), t("last update"), array("data" => t("operations"), "colspan" => 2)); while ($site = db_fetch_object($result)) { - $rows[] = array("<a href=\"$site->link\">$site->name</a>", ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never"), l(t("edit site"), "admin/cloud/edit/$site->sid"), l(t("update site"), "admin/cloud/update/$site->sid")); + $rows[] = array("<a href=\"$site->link\">$site->name</a>", ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never"), l(t("edit site"), "admin/syndication/cloud/edit/$site->sid"), l(t("update site"), "admin/syndication/cloud/update/$site->sid")); } return table($header, $rows); @@ -185,7 +186,7 @@ function cloud_admin() { global $op, $edit; if (empty($op)) { - $op = arg(2); + $op = arg(3); } if (user_access("administer site cloud")) { @@ -194,16 +195,13 @@ function cloud_admin() { print cloud_form(); break; case "edit": - print cloud_form(cloud_get_site(arg(3))); + print cloud_form(cloud_get_site(arg(4))); break; case "update": - print status(cloud_update(cloud_get_site(arg(3)))); + print status(cloud_update(cloud_get_site(arg(4)))); print cloud_display(); break; - case "help": - print cloud_help(); - break; - case "Delete": + case "Delete": $edit["name"] = 0; // fall through: case "Submit": |