improvements on mapadd

This commit is contained in:
kremsy
2014-01-12 17:15:59 +01:00
committed by Steffen Schröder
parent 8593f10ecc
commit 7a9627f41d
3 changed files with 17 additions and 17 deletions

View File

@ -52,7 +52,7 @@ class ManiaExchangeInfoSearcher { //TODO rename to ManiaExchangeManager
*
* @param $mxMapInfos
*/
private function updateMapObjectWithManiaExchangeIds($mxMapInfos) {
public function updateMapObjectsWithManiaExchangeIds($mxMapInfos) {
$mysqli = $this->maniaControl->database->mysqli;
// Save map data
$saveMapQuery = "UPDATE `" . MapManager::TABLE_MAPS . "`
@ -132,14 +132,14 @@ class ManiaExchangeInfoSearcher { //TODO rename to ManiaExchangeManager
//if($id % self::MAPS_PER_MX_FETCH == 0) {
if($id % 6 == 0) { //TODO 6 is temporary
$maps = $this->getMaplistByMixedUidIdString($mapIdString);
$this->updateMapObjectWithManiaExchangeIds($maps);
$this->updateMapObjectsWithManiaExchangeIds($maps);
$mapIdString = '';
}
}
if($mapIdString != '') {
$maps = $this->getMaplistByMixedUidIdString($mapIdString);
$this->updateMapObjectWithManiaExchangeIds($maps);
$this->updateMapObjectsWithManiaExchangeIds($maps);
}
$fetchMapStatement->close();