related to #1530 Status verification for Configuration > Menus page

This commit is contained in:
Matthieu Leproux
2021-10-22 11:18:53 +02:00
parent cd433f40e9
commit ac1e91534f
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -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');
?>