summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-07-08 12:03:11 +0000
committerDries Buytaert <dries@buytaert.net>2001-07-08 12:03:11 +0000
commitfdb5d1846d97f17d387f9f3191e6a9f5b8e63d46 (patch)
treea1f99b1c9b043bdee6112a08fbe52ce6e3241fda
parent99d712b6364720a949a3bf7066274c3288abc41b (diff)
downloadbrdo-fdb5d1846d97f17d387f9f3191e6a9f5b8e63d46.tar.gz
brdo-fdb5d1846d97f17d387f9f3191e6a9f5b8e63d46.tar.bz2
- A small addition.
-rw-r--r--modules/cloud.module10
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/cloud.module b/modules/cloud.module
index a384f0fde..fc3667a7c 100644
--- a/modules/cloud.module
+++ b/modules/cloud.module
@@ -87,12 +87,12 @@ function cloud_save($edit) {
}
function cloud_display() {
- $result = db_query("SELECT * FROM site ORDER BY timestamp DESC");
+ $result = db_query("SELECT * FROM site ORDER BY title");
$output .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n";
- $output .= " <tr><th>site</th><th>last update</th><th>operations</th></tr>\n";
+ $output .= " <tr><th>site</th><th>last update</th><th colspan=\"2\">operations</th></tr>\n";
while ($site = db_fetch_object($result)) {
- $output .= " <tr><td><a href=\"". check_output($site->url) ."\">". check_output($site->title) ."</a></td><td>". ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never") ."</td><td><a href=\"admin.php?mod=cloud&op=edit&id=$site->sid\">edit site</a></td></tr>\n";
+ $output .= " <tr><td><a href=\"". check_output($site->url) ."\">". check_output($site->title) ."</a></td><td>". ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never") ."</td><td><a href=\"admin.php?mod=cloud&op=edit&id=$site->sid\">edit site</a></td><td><a href=\"admin.php?mod=cloud&op=update&id=$site->sid\">update site</a></td></tr>\n";
}
$output .= "</table>\n";
@@ -142,6 +142,10 @@ function cloud_admin() {
case "edit":
print cloud_form(cloud_get_site($id));
break;
+ case "update":
+ print status(cloud_update(cloud_get_site($id)));
+ print cloud_display();
+ break;
case "help":
cloud_help();
break;