mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-13 21:31:35 +02:00
related to #1530 Status verification for Configuration > Menus page
This commit is contained in:
+7
-1
@@ -11,6 +11,10 @@ if (!defined('PHPWG_ROOT_PATH'))
|
||||
die ("Hacking attempt!");
|
||||
}
|
||||
|
||||
if (!is_webmaster())
|
||||
{
|
||||
$page['warnings'][] = l10n('Webmaster status is required.');
|
||||
}
|
||||
|
||||
function abs_fn_cmp($a, $b)
|
||||
{
|
||||
@@ -69,7 +73,7 @@ foreach ($reg_blocks as $id => $block)
|
||||
}
|
||||
|
||||
|
||||
if ( isset($_POST['submit']) )
|
||||
if ( isset($_POST['submit']) and is_webmaster())
|
||||
{
|
||||
foreach ( $mb_conf as $id => $pos )
|
||||
{
|
||||
@@ -150,6 +154,8 @@ foreach ($mb_conf as $id => $pos )
|
||||
$action = get_root_url().'admin.php?page=menubar';
|
||||
$template->assign(array('F_ACTION'=>$action));
|
||||
|
||||
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
|
||||
|
||||
$template->set_filename( 'menubar_admin_content', 'menubar.tpl' );
|
||||
$template->assign_var_from_handle( 'ADMIN_CONTENT', 'menubar_admin_content');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user