only show vote remover if the user can use it...

This commit is contained in:
Shish 2012-02-12 12:18:12 +00:00
parent 2da52689cf
commit 1a737bcbb8

8
contrib/numeric_score/main.php Executable file → Normal file
View File

@ -37,9 +37,11 @@ class NumericScore extends Extension {
} }
public function onUserPageBuilding(UserPageBuildingEvent $event) { public function onUserPageBuilding(UserPageBuildingEvent $event) {
global $page; global $page, $user;
$html = $this->theme->get_nuller_html($event->display_user); if($user->is_admin()) {
$page->add_block(new Block("Votes", $html, "main", 60)); $html = $this->theme->get_nuller_html($event->display_user);
$page->add_block(new Block("Votes", $html, "main", 60));
}
} }
public function onPageRequest(PageRequestEvent $event) { public function onPageRequest(PageRequestEvent $event) {