fixed bulletin

This commit is contained in:
Ulf Gebhardt 2015-09-30 23:00:37 +02:00
parent ec2b333a7a
commit f5b2e1c073
2 changed files with 5 additions and 2 deletions

View File

@ -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);
}

View File

@ -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();}