mx cleanup
This commit is contained in:
parent
da50ad5bdb
commit
3dd29b2303
@ -28,16 +28,13 @@ class MXMapInfo {
|
|||||||
public function __construct($prefix, $mx) {
|
public function __construct($prefix, $mx) {
|
||||||
$this->prefix = $prefix;
|
$this->prefix = $prefix;
|
||||||
if ($mx) {
|
if ($mx) {
|
||||||
|
|
||||||
if ($this->prefix == 'tm') {
|
if ($this->prefix == 'tm') {
|
||||||
$dir = 'tracks';
|
$dir = 'tracks';
|
||||||
} else { // 'sm' || 'qm'
|
|
||||||
$dir = 'maps';
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->prefix == 'tm' || !property_exists($mx, "MapID")) {
|
|
||||||
$this->id = $mx->TrackID;
|
$this->id = $mx->TrackID;
|
||||||
$this->uid = isset($mx->TrackUID) ? $mx->TrackUID : '';
|
$this->uid = isset($mx->TrackUID) ? $mx->TrackUID : '';
|
||||||
} else {
|
} else {
|
||||||
|
$dir = 'maps';
|
||||||
$this->id = $mx->MapID;
|
$this->id = $mx->MapID;
|
||||||
$this->uid = isset($mx->MapUID) ? $mx->MapUID : '';
|
$this->uid = isset($mx->MapUID) ? $mx->MapUID : '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user