MAPG-231 introduce unlisted maps

This commit is contained in:
bence committed 2022-05-26 14:23:08 +02:00
1 parent 4f45e213c3
commit d02aa4abe0
8 files changed
+39 -4

No files matched your search

+4
View File
@@ -81,6 +81,7 @@ class MapAdminController implements ISecured
'mapId' => $mapId,
'mapName' => $map->getName(),
'mapDescription' => str_replace('<br>', "\n", $map->getDescription()),
'mapUnlisted' => $map->getUnlisted(),
'bounds' => $map->getBounds()->toArray(),
'places' => &$places
]);
@@ -175,6 +176,9 @@ class MapAdminController implements ISecured
if (isset($_POST['description'])) {
$map->setDescription(str_replace(["\n", "\r\n"], '<br>', $_POST['description']));
}
if (isset($_POST['unlisted'])) {
$map->setUnlisted((bool)$_POST['unlisted']);
}
$this->pdm->saveToDb($map);