summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2001-07-08 14:57:52 (GMT)
committer Dries Buytaert2001-07-08 14:57:52 (GMT)
commitd3fc6962bcf402580ffaea4b8eb1030c03f1f9eb (patch)
tree0639d9f06cf530d9ef2886537a83b1dd05101d92
parent96098ce3bedb101a1d4f497f99bc06ba05068537 (diff)
- cloud.module:
+ more small visual updates (last time today)
-rw-r--r--modules/cloud.module9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/cloud.module b/modules/cloud.module
index 11d9210..199a58a 100644
--- a/modules/cloud.module
+++ b/modules/cloud.module
@@ -99,9 +99,10 @@ function cloud_display() {
return $output;
}
-function cloud_list() {
- $result = db_query("SELECT * FROM site ORDER BY timestamp DESC LIMIT 100");
+function cloud_list($limit = 10) {
+ $result = db_query("SELECT * FROM site ORDER BY timestamp DESC LIMIT $limit");
+ $hour = -1;
while ($site = db_fetch_object($result)) {
if ($hour != floor((time() - $site->timestamp) / 3600)) {
$hour = floor((time() - $site->timestamp) / 3600);
@@ -117,14 +118,14 @@ function cloud_page() {
if (user_access("access site cloud")) {
$theme->header();
- $theme->box(t("Updated sites"), cloud_list());
+ $theme->box(t("Updated sites"), cloud_list(100));
$theme->footer();
}
}
function cloud_block() {
$block[0]["subject"] = t("Sites");
- $block[0]["content"] = cloud_list();
+ $block[0]["content"] = cloud_list(20);
$block[0]["info"] = t("Sites");
return $block;
}