improved mx class

This commit is contained in:
kremsy 2014-01-12 22:31:50 +01:00 committed by Steffen Schröder
parent eca7ec86ae
commit 1fca467f7d

View File

@ -132,6 +132,7 @@ class ManiaExchangeInfoSearcher { //TODO rename to ManiaExchangeManager
//If Max Maplimit is reached, or string gets too long send the request
if($id % self::MAPS_PER_MX_FETCH == 0) {
$mapIdString = substr($mapIdString, 0, -1);
$maps = $this->getMaplistByMixedUidIdString($mapIdString);
$this->updateMapObjectsWithManiaExchangeIds($maps);
$mapIdString = '';
@ -141,6 +142,7 @@ class ManiaExchangeInfoSearcher { //TODO rename to ManiaExchangeManager
}
if($mapIdString != '') {
$mapIdString = substr($mapIdString, 0, -1);
$maps = $this->getMaplistByMixedUidIdString($mapIdString);
$this->updateMapObjectsWithManiaExchangeIds($maps);
}
@ -156,7 +158,6 @@ class ManiaExchangeInfoSearcher { //TODO rename to ManiaExchangeManager
// compile search URL
$url = 'http://api.mania-exchange.com/' . $titlePrefix . '/maps/?ids=' . $string;
// $mapInfo = FileUtil::loadFile($url, "application/json"); //TODO use mc fileutil
$mapInfo = $this->get_file($url);