diff --git a/admin/menubar.php b/admin/menubar.php index fd97ee293..a79714fe8 100644 --- a/admin/menubar.php +++ b/admin/menubar.php @@ -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'); ?> diff --git a/admin/themes/default/template/menubar.tpl b/admin/themes/default/template/menubar.tpl index ed6e6310a..0260b1173 100644 --- a/admin/themes/default/template/menubar.tpl +++ b/admin/themes/default/template/menubar.tpl @@ -66,7 +66,7 @@ jQuery(document).ready(function(){ {/foreach}