mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-02 04:15:05 +02:00
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
This commit is contained in:
@@ -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 |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user