diff options
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": |