summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery_block.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2011-01-16 22:16:09 -0800
committerBharat Mediratta <bharat@menalto.com>2011-01-16 22:16:09 -0800
commit70abfb2a20734802c922c0e9917d2a1778aef3f2 (patch)
treefb8371b9c03da2eca3501372d330a53430fff7b9 /modules/gallery/helpers/gallery_block.php
parent84d576606d709dcccef2549fdb926d47494a876c (diff)
Upgrade checking code is now here, along with a bump of the Gallery
module to v46. There's a new block in the admin dashboard which controls whether automatic checking happens, and lets you check immediately. If a newer version is detected, a site status message appears for admins providing upgrade instructions. Automatic checking is not yet implemented (even though the UI claims that it exists). This is all for #1605.
Diffstat (limited to 'modules/gallery/helpers/gallery_block.php')
-rw-r--r--modules/gallery/helpers/gallery_block.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php
index 1d92d66d..2189a710 100644
--- a/modules/gallery/helpers/gallery_block.php
+++ b/modules/gallery/helpers/gallery_block.php
@@ -25,7 +25,9 @@ class gallery_block_Core {
"log_entries" => t("Log entries"),
"stats" => t("Gallery stats"),
"platform_info" => t("Platform information"),
- "project_news" => t("Gallery project news"));
+ "project_news" => t("Gallery project news"),
+ "upgrade_checker" => t("Check for Gallery upgrades")
+ );
}
static function get_site_list() {
@@ -101,6 +103,14 @@ class gallery_block_Core {
$block = "";
}
break;
+
+ case "upgrade_checker":
+ $block = new Block();
+ $block->css_id = "g-upgrade-available-block";
+ $block->title = t("Check for Gallery upgrades");
+ $block->content = new View("upgrade_checker_block.html");
+ $block->content->version_info = upgrade_checker::version_info();
+ $block->content->auto_check_enabled = upgrade_checker::auto_check_enabled();
}
return $block;
}