MAPG-119 fix distribution of the ids of the newly created places

This commit is contained in:
Bence Pőcze 2020-06-10 23:58:09 +02:00
parent ff201c2e8e
commit be8f0a1486

View File

@ -83,7 +83,7 @@ class MapAdminController implements ISecured
foreach ($_POST['added'] as $placeRaw) { foreach ($_POST['added'] as $placeRaw) {
$placeRaw = json_decode($placeRaw, true); $placeRaw = json_decode($placeRaw, true);
$addedIds[] = ['tempId' => $placeRaw['id'], $this->placeRepository->addToMap($mapId, [ $addedIds[] = ['tempId' => $placeRaw['id'], 'id' => $this->placeRepository->addToMap($mapId, [
'lat' => (float) $placeRaw['lat'], 'lat' => (float) $placeRaw['lat'],
'lng' => (float) $placeRaw['lng'], 'lng' => (float) $placeRaw['lng'],
'pano_id_cached_timestamp' => $placeRaw['panoId'] === -1 ? (new DateTime('-1 day'))->format('Y-m-d H:i:s') : null 'pano_id_cached_timestamp' => $placeRaw['panoId'] === -1 ? (new DateTime('-1 day'))->format('Y-m-d H:i:s') : null