maplistkarma fix

This commit is contained in:
kremsy 2014-04-30 21:44:26 +02:00 committed by Steffen Schröder
parent 31a7572836
commit 0daa1e82b5

View File

@ -426,8 +426,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$votes = $karmaPlugin->getMapVotes($map);
if (is_numeric($karma)) {
if($this->maniaControl->settingManager->getSetting($karmaPlugin, $karmaPlugin::SETTING_NEWKARMA)) {
$endKarma = $karma;
$karmaText = ' ' . round($karma * 100.) . '% (' . $votes['count'] . ')';
} else {
$min = 0;
$plus = 0;
@ -465,7 +464,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$karmaLabel->setTextSize(0.9);
$karmaLabel->setTextColor('000');
$karmaLabel->setAlign(Control::CENTER, Control::CENTER);
$karmaLabel->setText(' ' . $endKarma . ' (' . $votes['count'] . 'x / ' . round($karma * 100.) . '%)');
$karmaLabel->setText($karmaText);
}
}