From c308ae09a5ffca881a439713c8ab8fec80ba2619 Mon Sep 17 00:00:00 2001 From: kremsy Date: Wed, 30 Apr 2014 15:22:30 +0200 Subject: [PATCH] removed mx karma key --- .../core/ManiaExchange/ManiaExchangeManager.php | 12 +----------- application/core/Maps/MapManager.php | 7 +------ 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/application/core/ManiaExchange/ManiaExchangeManager.php b/application/core/ManiaExchange/ManiaExchangeManager.php index f2cbe9d8..bb1a492e 100644 --- a/application/core/ManiaExchange/ManiaExchangeManager.php +++ b/application/core/ManiaExchange/ManiaExchangeManager.php @@ -78,7 +78,7 @@ class ManiaExchangeManager { foreach($mxMapInfos as $mxMapInfo) { /** @var MXMapInfo $mxMapInfo */ $mapMxId = $mxMapInfo->id; - $mapUId = $mxMapInfo->uid; + $mapUId = $mxMapInfo->uid; $saveMapStatement->execute(); if ($saveMapStatement->error) { trigger_error($saveMapStatement->error); @@ -195,8 +195,6 @@ class ManiaExchangeManager { // compile search URL $url = 'http://api.mania-exchange.com/' . $titlePrefix . '/maps/?ids=' . $id; - $url .= '&key=t42kEMjzH7xpAjBFHAvEkC7rqAlw'; - return $this->maniaControl->fileReader->loadFile($url, function ($mapInfo, $error) use (&$function, $titlePrefix, $url) { $mxMapInfo = null; @@ -227,7 +225,6 @@ class ManiaExchangeManager { // compile search URL $url = 'http://api.mania-exchange.com/' . $titlePrefix . '/maps/?ids=' . $string; - $url .= '&key=t42kEMjzH7xpAjBFHAvEkC7rqAlw'; $thisRef = $this; $success = $this->maniaControl->fileReader->loadFile($url, function ($mapInfo, $error) use ($thisRef, $titlePrefix, $url) { @@ -304,13 +301,6 @@ class ManiaExchangeManager { $url .= '&minexebuild=' . self::MIN_EXE_BUILD; - $url .= '&key=t42kEMjzH7xpAjBFHAvEkC7rqAlw'; - if ($titlePrefix == "tm") { - $url .= '&mapgroup=17'; - } else { - $url .= '&mapgroup=1'; - } - // Get MapTypes try { $scriptInfos = $this->maniaControl->client->getModeScriptInfo(); diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index a6759b6d..03f9be30 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -611,13 +611,8 @@ class MapManager implements CallbackListener { return; } - // TODO hardcoded during closed beta, later take just $mapInfo->url again - $url = 'http://' . $mapInfo->prefix . '.mania-exchange.com/' . $mapInfo->dir . '/download/' . $mapInfo->id; - $url .= '?key=t42kEMjzH7xpAjBFHAvEkC7rqAlw'; - - // Download the file - $self->maniaControl->fileReader->loadFile($url, function ($file, $error) use (&$self, &$login, &$mapInfo, &$update) { + $self->maniaControl->fileReader->loadFile($mapInfo->downloadurl, function ($file, $error) use (&$self, &$login, &$mapInfo, &$update) { if (!$file) { // Download error $self->maniaControl->chat->sendError('Download failed!', $login);