From 6d78fc35f76e91671ca22127da898d455e7f4992 Mon Sep 17 00:00:00 2001 From: kremsy Date: Thu, 23 Jul 2015 13:09:16 +0200 Subject: [PATCH] mx list limit fix --- changelog.txt | 4 ++-- core/ManiaControl.php | 2 +- core/ManiaExchange/ManiaExchangeManager.php | 1 + core/ManiaExchange/ManiaExchangeMapSearch.php | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 565498ee..7002b6af 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,13 +1,13 @@ -###v0.16x### +###v0.161### #Additions - added admin chatcommand //uptime which displays the time since when the server is running - updated playerhitstructure with new properties #Bug Fixes - fixed some z positions to be in front of overlays (especially in Trackmania) +- fixed limit problem on maniaexchange list ###v0.16### - #Additions - added changelog - added CommunicationManager which acts like a communication interface you can connect to and interact with ManiaControl (also thanks to TGYoshi for some help) diff --git a/core/ManiaControl.php b/core/ManiaControl.php index 60549c7e..1215abcf 100644 --- a/core/ManiaControl.php +++ b/core/ManiaControl.php @@ -47,7 +47,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener, /* * Constants */ - const VERSION = '0.160'; + const VERSION = '0.161'; const API_VERSION = '2013-04-16'; const MIN_DEDIVERSION = '2014-04-02_18_00'; const SCRIPT_TIMEOUT = 10; diff --git a/core/ManiaExchange/ManiaExchangeManager.php b/core/ManiaExchange/ManiaExchangeManager.php index f220ab3f..f6be74cb 100644 --- a/core/ManiaExchange/ManiaExchangeManager.php +++ b/core/ManiaExchange/ManiaExchangeManager.php @@ -294,6 +294,7 @@ class ManiaExchangeManager { $mapSearch = new ManiaExchangeMapSearch($this->maniaControl); $mapSearch->setMapName($name); $mapSearch->setAuthorName($author); + var_dump($maxMapsReturned); $mapSearch->setMapLimit($maxMapsReturned); $mapSearch->setPrioritySortOrder($sortOrder); diff --git a/core/ManiaExchange/ManiaExchangeMapSearch.php b/core/ManiaExchange/ManiaExchangeMapSearch.php index ec6a4d39..4cc7a51f 100644 --- a/core/ManiaExchange/ManiaExchangeMapSearch.php +++ b/core/ManiaExchange/ManiaExchangeMapSearch.php @@ -100,7 +100,7 @@ class ManiaExchangeMapSearch { $this->url = 'http://' . $this->titlePrefix . '.mania-exchange.com/tracksearch2/search?api=on'; //Set some defaults: - $this->limit = 100; + $this->mapLimit = 100; $this->priorityOrder = self::SEARCH_ORDER_UPDATED_NEWEST; //Set Min Exe Build Default for games which are not Trackmania @@ -223,7 +223,7 @@ class ManiaExchangeMapSearch { } $mxMapList = $mxMapList->results; - + if ($mxMapList === null) { trigger_error('Cannot decode searched JSON data'); return;