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

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

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