From 3dd29b2303f131c3bf0c323d36e2881d8eadbb71 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sun, 16 Feb 2014 17:42:35 +0100 Subject: [PATCH] mx cleanup --- application/core/ManiaExchange/MXMapInfo.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/application/core/ManiaExchange/MXMapInfo.php b/application/core/ManiaExchange/MXMapInfo.php index b89c69bd..1b5936c3 100644 --- a/application/core/ManiaExchange/MXMapInfo.php +++ b/application/core/ManiaExchange/MXMapInfo.php @@ -28,16 +28,13 @@ class MXMapInfo { public function __construct($prefix, $mx) { $this->prefix = $prefix; if ($mx) { + if ($this->prefix == 'tm') { $dir = 'tracks'; - } else { // 'sm' || 'qm' - $dir = 'maps'; - } - - if ($this->prefix == 'tm' || !property_exists($mx, "MapID")) { $this->id = $mx->TrackID; $this->uid = isset($mx->TrackUID) ? $mx->TrackUID : ''; } else { + $dir = 'maps'; $this->id = $mx->MapID; $this->uid = isset($mx->MapUID) ? $mx->MapUID : ''; }