parent
bbc5d4a152
commit
67388cad9b
|
@ -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 /> ". format_url($site->link, $site->name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue