Commit 67388cad authored by Dries's avatar Dries
Browse files

- cloud.module:

    + small update
parent bbc5d4a1
......@@ -120,10 +120,17 @@ 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);
$output .= "<p />Updated ". format_plural($hour, "hour", "hours") ." ago:";
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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment