aboutsummaryrefslogtreecommitdiffstats
path: root/admin/maintenance.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-01-31 00:33:01 +0000
committerplegall <plg@piwigo.org>2012-01-31 00:33:01 +0000
commit7c322f6d9c241c9282bc9c8362e702b49814fbad (patch)
tree82a8b6a2eb7bd7fda8ea2882f586c3ef9ddcd269 /admin/maintenance.php
parent907c8e2104ac7f96327b16a3daee78947c21432f (diff)
bug 2558 fixed: instead of locking the gallery with a simple checkbox among
configuration options, "lock gallery" becomes a maintenance action, with a confirmation on popup. git-svn-id: http://piwigo.org/svn/trunk@13001 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/maintenance.php')
-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 |
// +-----------------------------------------------------------------------+