small fix

This commit is contained in:
kremsy 2014-02-13 20:48:25 +01:00 committed by Steffen Schröder
parent 6787012047
commit 7b733be0bc

View File

@ -92,6 +92,7 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
/**
* Register a Certain Stat
*
* @param $statName
* @param $order
* @param $headShortCut
@ -186,8 +187,9 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
//Description Label
$i = 2;
foreach($this->statArray as $statArray) {
if(!isset($labels[$i]))
if (!isset($labels[$i])) {
break;
}
/** @var Label_Text $labels [] */
$labels[$i]->setAction(self::ACTION_SORT_STATS . '.' . $statArray["Name"]);
@ -203,6 +205,10 @@ class SimpleStatsList implements ManialinkPageAnswerListener, CallbackListener,
$i = 1;
$y -= 10;
if (!isset($statRankings[$order])) {
return;
}
foreach($statRankings[$order] as $playerId => $value) {
$listPlayer = $this->maniaControl->playerManager->getPlayerByIndex($playerId);
if ($i == 15) {