aboutsummaryrefslogtreecommitdiffstats
path: root/admin/maintenance.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--admin/maintenance.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/admin/maintenance.php b/admin/maintenance.php
index 405f45053..c8547a118 100644
--- a/admin/maintenance.php
+++ b/admin/maintenance.php
@@ -47,6 +47,19 @@ $action = isset($_GET['action']) ? $_GET['action'] : '';
switch ($action)
{
+ case 'lock_gallery' :
+ {
+ conf_update_param('gallery_locked', 'true');
+ redirect(get_root_url().'admin.php?page=maintenance');
+ break;
+ }
+ case 'unlock_gallery' :
+ {
+ conf_update_param('gallery_locked', 'false');
+ $_SESSION['page_infos'] = array(l10n('Gallery unlocked'));
+ redirect(get_root_url().'admin.php?page=maintenance');
+ break;
+ }
case 'categories' :
{
update_uppercats();
@@ -164,6 +177,23 @@ $template->assign(
)
);
+if ($conf['gallery_locked'])
+{
+ $template->assign(
+ array(
+ 'U_MAINT_UNLOCK_GALLERY' => sprintf($url_format, 'unlock_gallery'),
+ )
+ );
+}
+else
+{
+ $template->assign(
+ array(
+ 'U_MAINT_LOCK_GALLERY' => sprintf($url_format, 'lock_gallery'),
+ )
+ );
+}
+
// +-----------------------------------------------------------------------+
// | Define advanced features |
// +-----------------------------------------------------------------------+