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:
plegall
2012-01-31 00:33:01 +00:00
parent 907c8e2104
commit 7c322f6d9c
6 changed files with 45 additions and 23 deletions
-11
View File
@@ -46,7 +46,6 @@ else
}
$main_checkboxes = array(
'gallery_locked',
'allow_user_registration',
'obligatory_user_mail_address',
'rate',
@@ -172,16 +171,6 @@ if (isset($_POST['submit']))
}
}
if (empty($_POST['gallery_locked']) and $conf['gallery_locked'])
{
$tpl_var = & $template->get_template_vars('header_msgs');
$msg_key = array_search(l10n('The gallery is locked for maintenance. Please, come back later.'), $tpl_var);
unset($tpl_var[$msg_key]);
}
elseif (!empty($_POST['gallery_locked']) and !$conf['gallery_locked'])
{
$template->append('header_msgs', l10n('The gallery is locked for maintenance. Please, come back later.'));
}
foreach( $main_checkboxes as $checkbox)
{
$_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';