diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-12 22:22:11 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-12 22:22:11 +0000 |
commit | 1bd696b3d8eb8175cc2b6583716fe3e89110aab0 (patch) | |
tree | 8397924e859ecc7054d7523d14c8a84414275770 /engine/lib | |
parent | fbda2a3968b75b57d7790e8e2108d929499b0f29 (diff) | |
download | elgg-1bd696b3d8eb8175cc2b6583716fe3e89110aab0.tar.gz elgg-1bd696b3d8eb8175cc2b6583716fe3e89110aab0.tar.bz2 |
Fixed #3093: Admin link shows only for admin users.
git-svn-id: http://code.elgg.org/elgg/trunk@8674 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r-- | engine/lib/admin.php | 16 |
1 files changed, 9 insertions, 7 deletions
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'); |