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