only show vote remover if the user can use it...
This commit is contained in:
parent
2da52689cf
commit
1a737bcbb8
4
contrib/numeric_score/main.php
Executable file → Normal file
4
contrib/numeric_score/main.php
Executable file → Normal 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user