Store maps (layers) settings in DB + display only project-relevant layers
This commit is contained in:
@@ -168,6 +168,16 @@ class Project extends PhpObject {
|
||||
return $iLastUpdate;
|
||||
}
|
||||
|
||||
public function getMaps() {
|
||||
$sQuery =
|
||||
"SELECT codename, geo_name, min_zoom, max_zoom, attribution ".
|
||||
"FROM ".Spot::MAPPING_TABLE." ".
|
||||
"LEFT JOIN ".Spot::MAP_TABLE." USING(".Db::getId(Spot::MAP_TABLE).") ".
|
||||
"WHERE ".Db::getId(self::PROJ_TABLE)." = ".$this->getProjectId()." ".
|
||||
"OR ".Db::getId(self::PROJ_TABLE)." IS NULL ";
|
||||
return $this->oDb->getArrayQuery($sQuery, true);
|
||||
}
|
||||
|
||||
private function setProjectInfo() {
|
||||
if($this->getProjectId() > 0) {
|
||||
$asProject = $this->getProject();
|
||||
|
||||
Reference in New Issue
Block a user