Skip to content
Snippets Groups Projects
Commit d3fc6962 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- cloud.module:
    + more small visual updates (last time today)
parent 96098ce3
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment