From 1bd696b3d8eb8175cc2b6583716fe3e89110aab0 Mon Sep 17 00:00:00 2001 From: brettp Date: Sat, 12 Mar 2011 22:22:11 +0000 Subject: Fixed #3093: Admin link shows only for admin users. git-svn-id: http://code.elgg.org/elgg/trunk@8674 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/admin.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/admin.php b/engine/lib/admin.php index 4e0c4f681..104b362a9 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -220,13 +220,15 @@ function admin_init() { // plugin settings are added in elgg_admin_add_plugin_settings_menu() via the admin page handler // for performance reasons. - elgg_register_menu_item('topbar', array( - 'name' => 'administration', - 'href' => 'admin', - 'text' => elgg_view_icon('settings') . elgg_echo('admin'), - 'priority' => 100, - 'section' => 'alt', - )); + if (elgg_is_admin_logged_in()) { + elgg_register_menu_item('topbar', array( + 'name' => 'administration', + 'href' => 'admin', + 'text' => elgg_view_icon('settings') . elgg_echo('admin'), + 'priority' => 100, + 'section' => 'alt', + )); + } // widgets $widgets = array('online_users', 'new_users', 'content_stats', 'admin_welcome'); -- cgit v1.2.3