fixed bulletin
This commit is contained in:
parent
ec2b333a7a
commit
f5b2e1c073
@ -128,7 +128,7 @@ class default_bulletin extends SYSTEM\PAGE\Page {
|
||||
|
||||
private function voice_weight(){
|
||||
$vars = votes::get_count_user_votes_per_poll($this->poll_ID);
|
||||
$vars['voteweight'] = round(1/$vars['count']*100);
|
||||
$vars['voteweight'] = $vars['count'] ? round(1/$vars['count']*100) : 'no votes';
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_bulletin/tpl/voteweight.tpl'), $vars);
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,10 @@ class page_uvote extends \SYSTEM\API\api_default {
|
||||
return (new user_main_myVote())->html();}
|
||||
|
||||
public static function page_user_main_poll($poll_ID) {
|
||||
return (new user_main_poll($poll_ID))->html();}
|
||||
//return (new user_main_poll($poll_ID))->html();}
|
||||
if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
|
||||
return (new default_register ())->html();}
|
||||
return (new default_bulletin($poll_ID))->html();}
|
||||
|
||||
public static function page_user_list(){
|
||||
return (new user_list())->html();}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user