small fixes/cleanups

This commit is contained in:
kremsy
2015-02-01 11:34:51 +01:00
parent fd7770d167
commit ef90574ca0
3 changed files with 9 additions and 5 deletions

View File

@ -454,7 +454,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
$votes = $karmaPlugin->getMapVotes($map);
}
if (is_numeric($karma)) {
if (is_numeric($karma) && $votes['count'] > 0) {
if ($this->maniaControl->getSettingManager()->getSettingValue($karmaPlugin, $karmaPlugin::SETTING_NEWKARMA)
) {
$karmaText = ' ' . round($karma * 100.) . '% (' . $votes['count'] . ')';