small fix
This commit is contained in:
parent
b2c2c98c78
commit
fb1f12b8b4
@ -44,7 +44,7 @@ class Map {
|
||||
public function __construct($mpMap = null) {
|
||||
$this->startTime = time();
|
||||
|
||||
if(!$mpMap) {
|
||||
if (!$mpMap) {
|
||||
return;
|
||||
}
|
||||
$this->name = FORMATTER::stripDirtyCodes($mpMap->name);
|
||||
@ -56,10 +56,7 @@ class Map {
|
||||
$this->copperPrice = $mpMap->copperPrice;
|
||||
$this->mapType = $mpMap->mapType;
|
||||
$this->mapStyle = $mpMap->mapStyle;
|
||||
|
||||
if(isset($mpMap->nbCheckpoints)) {
|
||||
$this->nbCheckpoints = $mpMap->nbCheckpoints;
|
||||
}
|
||||
|
||||
$this->authorNick = $this->authorLogin;
|
||||
}
|
||||
@ -71,7 +68,7 @@ class Map {
|
||||
*/
|
||||
public function updateAvailable() {
|
||||
|
||||
if($this->mx != null && ($this->lastUpdate < strtotime($this->mx->updated) || $this->uid != $this->mx->uid)) {
|
||||
if ($this->mx != null && ($this->lastUpdate < strtotime($this->mx->updated) || $this->uid != $this->mx->uid)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -376,6 +376,7 @@ class MapManager implements CallbackListener {
|
||||
|
||||
if (array_key_exists($rpcMap->uId, $this->maps)) {
|
||||
$this->currentMap = $this->maps[$rpcMap->uId];
|
||||
$this->currentMap->nbCheckpoints = $rpcMap->nbCheckpoints;
|
||||
return true;
|
||||
}
|
||||
$map = $this->initializeMap($rpcMap);
|
||||
|
Loading…
Reference in New Issue
Block a user