From 3423bef7a3f37e8c01ae2446578396f161197591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Fri, 16 May 2014 20:31:50 +0200 Subject: [PATCH] fixed error --- application/core/Maps/MapList.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index 5e551466..a3ddafe5 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -216,6 +216,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $pageNumber = 1 + $chunkIndex * self::MAX_PAGES_PER_CHUNK; $paging->setStartPageNumber($pageIndex + 1); + $index = 0; $id = 1 + $mapsBeginIndex; $y = $height / 2 - 10; $pageFrame = null; @@ -228,7 +229,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $mxIconGreenHover = $this->maniaControl->manialinkManager->iconManager->getIcon(IconManager::MX_ICON_GREEN_MOVER); foreach ($mapList as $map) { - if ($id % self::MAX_MAPS_PER_PAGE === 0) { + if ($index % self::MAX_MAPS_PER_PAGE === 0) { $pageFrame = new Frame(); $frame->add($pageFrame); $y = $height / 2 - 10; @@ -463,6 +464,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $y -= 4; $id++; + $index++; } $this->maniaControl->manialinkManager->displayWidget($maniaLink, $player, 'MapList');