aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-12-16 17:32:01 -0500
committerBrett Profitt <brett.profitt@gmail.com>2012-12-16 17:32:01 -0500
commitcc0f1ddad2fac1d1761d59a818f1c41d7db6ed0d (patch)
tree322d7a5e3104a17b64d65a12ce1478a14ced4cb1 /views
parentd719d03f1b0e636db021e728cf79a10176d991da (diff)
parent22e8d9be4582b78a500382e14046a653a14e3f43 (diff)
downloadelgg-cc0f1ddad2fac1d1761d59a818f1c41d7db6ed0d.tar.gz
elgg-cc0f1ddad2fac1d1761d59a818f1c41d7db6ed0d.tar.bz2
Merge branch 'pr-309' into 1.8
Diffstat (limited to 'views')
-rw-r--r--views/default/widgets/control_panel/content.php26
1 files changed, 20 insertions, 6 deletions
diff --git a/views/default/widgets/control_panel/content.php b/views/default/widgets/control_panel/content.php
index d2db54bc6..a348d612f 100644
--- a/views/default/widgets/control_panel/content.php
+++ b/views/default/widgets/control_panel/content.php
@@ -11,12 +11,26 @@ elgg_register_menu_item('admin_control_panel', array(
'link_class' => 'elgg-button elgg-button-action',
));
-elgg_register_menu_item('admin_control_panel', array(
- 'name' => 'upgrade',
- 'text' => elgg_echo('upgrade'),
- 'href' => 'upgrade.php',
- 'link_class' => 'elgg-button elgg-button-action',
-));
+// @todo Move in this in ElggUpgradeManager::isLocked() when #4682 fixed
+$is_locked = _elgg_upgrade_is_locked();
+
+if (!$is_locked) {
+ elgg_register_menu_item('admin_control_panel', array(
+ 'name' => 'upgrade',
+ 'text' => elgg_echo('upgrade'),
+ 'href' => 'upgrade.php',
+ 'link_class' => 'elgg-button elgg-button-action',
+ ));
+} else {
+ elgg_register_menu_item('admin_control_panel', array(
+ 'name' => 'unlock_upgrade',
+ 'text' => elgg_echo('upgrade:unlock'),
+ 'href' => 'action/admin/site/unlock_upgrade',
+ 'is_action' => true,
+ 'link_class' => 'elgg-button elgg-button-action',
+ 'confirm' => elgg_echo('upgrade:unlock:confirm'),
+ ));
+}
echo elgg_view_menu('admin_control_panel', array(
'class' => 'elgg-menu-hz',