aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 22:22:11 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-12 22:22:11 +0000
commit1bd696b3d8eb8175cc2b6583716fe3e89110aab0 (patch)
tree8397924e859ecc7054d7523d14c8a84414275770
parentfbda2a3968b75b57d7790e8e2108d929499b0f29 (diff)
downloadelgg-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
-rw-r--r--engine/lib/admin.php16
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');