diff --git a/application/core/ManiaExchange/MXMapInfo.php b/application/core/ManiaExchange/MXMapInfo.php index 927cf7e4..8c1fb32b 100644 --- a/application/core/ManiaExchange/MXMapInfo.php +++ b/application/core/ManiaExchange/MXMapInfo.php @@ -15,7 +15,7 @@ class MXMapInfo { public $titlepack, $style, $envir, $mood, $dispcost, $lightmap, $modname, $exever; public $exebld, $routes, $length, $unlimiter, $laps, $difficulty, $lbrating, $trkvalue; public $replaytyp, $replayid, $replaycnt, $acomment, $awards, $comments, $rating; - public $ratingex, $ratingcnt, $pageurl, $replayurl, $imageurl, $thumburl, $dloadurl; + public $ratingex, $ratingcnt, $pageurl, $replayurl, $imageurl, $thumburl, $downLoadUrl; /** * Returns map object with all available data from MX map data @@ -36,10 +36,10 @@ class MXMapInfo { if ($this->prefix == 'tm' || !property_exists($mx, "MapID")) { $this->id = $mx->TrackID; - $this->uid = isset($mx->TrackUID) ? $mx->TrackUID : ''; + $this->uid = isset($mx->TrackUID) ? $mx->TrackUID : ''; } else { $this->id = $mx->MapID; - $this->uid = isset($mx->MapUID) ? $mx->MapUID : ''; + $this->uid = isset($mx->MapUID) ? $mx->MapUID : ''; } if (!isset($mx->GbxMapName) || $mx->GbxMapName == '?') { @@ -91,10 +91,10 @@ class MXMapInfo { $this->acomment = str_ireplace($search, $replace, $this->acomment); $this->acomment = preg_replace('/\[url=.*\]/', '', $this->acomment); - $this->pageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/view/' . $this->id; - $this->imageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/screenshot/normal/' . $this->id; - $this->thumburl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/screenshot/small/' . $this->id; - $this->dloadurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/download/' . $this->id; + $this->pageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/view/' . $this->id; + $this->imageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/screenshot/normal/' . $this->id; + $this->thumburl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/screenshot/small/' . $this->id; + $this->downLoadUrl = 'http://' . $this->prefix . '.mania-exchange.com/' . $dir . '/download/' . $this->id; if ($this->prefix == 'tm' && $this->replayid > 0) { $this->replayurl = 'http://' . $this->prefix . '.mania-exchange.com/replays/download/' . $this->replayid; diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index e69c1cf3..61aa1ec6 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -502,8 +502,6 @@ class MapManager implements CallbackListener { $serverInfo = $this->maniaControl->client->getSystemInfo(); $title = strtolower(substr($serverInfo->titleId, 0, 2)); - $url = "http://{$title}.mania-exchange.com/tracks/download/{$mapInfo->id}"; - //Download the file $function = function ($file, $error) use (&$login, &$mapInfo, &$mapDir, &$update) { if (!$file) { @@ -513,7 +511,7 @@ class MapManager implements CallbackListener { } $this->processMapFile($file, $mapInfo, $mapDir, $login, $update); }; - $this->maniaControl->fileReader->loadFile($url, $function); + $this->maniaControl->fileReader->loadFile($mapInfo->downLoadUrl, $function); }); } }