From 1a737bcbb89e11a8fa98105a4919323ad9d2ff98 Mon Sep 17 00:00:00 2001 From: Shish <shish@shishnet.org> Date: Sun, 12 Feb 2012 12:18:12 +0000 Subject: [PATCH] only show vote remover if the user can use it... --- contrib/numeric_score/main.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) mode change 100755 => 100644 contrib/numeric_score/main.php diff --git a/contrib/numeric_score/main.php b/contrib/numeric_score/main.php old mode 100755 new mode 100644 index 5eefa612..5d686e0a --- a/contrib/numeric_score/main.php +++ b/contrib/numeric_score/main.php @@ -37,9 +37,11 @@ class NumericScore extends Extension { } public function onUserPageBuilding(UserPageBuildingEvent $event) { - global $page; - $html = $this->theme->get_nuller_html($event->display_user); - $page->add_block(new Block("Votes", $html, "main", 60)); + global $page, $user; + if($user->is_admin()) { + $html = $this->theme->get_nuller_html($event->display_user); + $page->add_block(new Block("Votes", $html, "main", 60)); + } } public function onPageRequest(PageRequestEvent $event) {