Separate project / feed / settings
All checks were successful
Deploy Spot / deploy (push) Successful in 49s
All checks were successful
Deploy Spot / deploy (push) Successful in 49s
This commit is contained in:
13
lib/Spot.php
13
lib/Spot.php
@@ -325,19 +325,20 @@ class Spot extends Main
|
||||
$asMarkers = [...$asMessages, ...$asGeoMedias];
|
||||
usort($asMarkers, function($a, $b){return $a['unix_time'] > $b['unix_time'];});
|
||||
|
||||
//Spot Last Update
|
||||
$asLastUpdate = array();
|
||||
$this->addTimeStamp($asLastUpdate, $this->oProject->getLastUpdate());
|
||||
|
||||
$asResult = array(
|
||||
'markers' => $asMarkers,
|
||||
'maps' => $this->oMap->getProjectMaps($this->oProject->getProjectId()),
|
||||
'last_update' => $asLastUpdate
|
||||
'maps' => $this->oMap->getProjectMaps($this->oProject->getProjectId())
|
||||
);
|
||||
|
||||
return $bInternal?$asResult:self::getJsonResult(true, '', $asResult);
|
||||
}
|
||||
|
||||
public function getLastUpdate() {
|
||||
$asLastUpdate = array();
|
||||
$this->addTimeStamp($asLastUpdate, $this->oProject->getLastUpdate());
|
||||
return self::getJsonResult(true, '', $asLastUpdate);
|
||||
}
|
||||
|
||||
public function subscribe($sEmail, $sNickName) {
|
||||
$asResult = $this->oUser->addUser($sEmail, $this->oLang->getLanguage(), date_default_timezone_get(), $sNickName);
|
||||
$asUserInfo = $this->oUser->getUserInfo();
|
||||
|
||||
@@ -42,6 +42,9 @@ if($sAction!='')
|
||||
case 'markers':
|
||||
$sResult = $oSpot->getMarkers();
|
||||
break;
|
||||
case 'last_update':
|
||||
$sResult = $oSpot->getLastUpdate();
|
||||
break;
|
||||
case 'geojson':
|
||||
$sResult = $oSpot->getProjectGeoJson();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user