- cloud.module:

+ small update
3-00
Dries Buytaert 2001-07-17 07:05:33 +00:00
parent bbc5d4a152
commit 67388cad9b
1 changed files with 8 additions and 1 deletions

View File

@ -120,11 +120,18 @@ function cloud_list($limit = 10) {
$result = db_query("SELECT * FROM site WHERE timestamp > ". (time() - 604800) ." ORDER BY timestamp DESC LIMIT $limit");
$hour = -1;
$list = -1;
while ($site = db_fetch_object($result)) {
if ($hour != floor((time() - $site->timestamp) / 3600)) {
$hour = floor((time() - $site->timestamp) / 3600);
if ($hour < 12) {
$output .= "<p />Updated ". format_plural($hour, "hour", "hours") ." ago:";
}
else if ($list) {
$output .= "<p />Updated ". format_plural($hour, "+ hour", "+ hours") ." ago:";
$list = 0;
}
}
$output .= "<br /> &nbsp; ". format_url($site->link, $site->name);
}
return $output;