replace new-style [] expression with old-style array()

Also removes some unused code.

fixes #444
This commit is contained in:
Sarah Hoffmann
2016-05-01 11:17:18 +02:00
parent 54ef9105d0
commit 4e0e0c1797
4 changed files with 15 additions and 40 deletions

View File

@@ -111,13 +111,13 @@
<script type="text/javascript">
<?php
$aNominatimMapInit = [
$aNominatimMapInit = array(
'zoom' => isset($_GET['zoom']) ? htmlspecialchars($_GET['zoom']) : CONST_Default_Zoom,
'lat' => isset($_GET['lat'] ) ? htmlspecialchars($_GET['lat'] ) : CONST_Default_Lat,
'lon' => isset($_GET['lon'] ) ? htmlspecialchars($_GET['lon'] ) : CONST_Default_Lon,
'lat' => isset($_GET['lat']) ? htmlspecialchars($_GET['lat']) : CONST_Default_Lat,
'lon' => isset($_GET['lon']) ? htmlspecialchars($_GET['lon']) : CONST_Default_Lon,
'tile_url' => $sTileURL,
'tile_attribution' => $sTileAttribution
];
);
echo 'var nominatim_map_init = ' . json_encode($aNominatimMapInit, JSON_PRETTY_PRINT) . ';';
echo 'var nominatim_results = ' . json_encode([$aPlace], JSON_PRETTY_PRINT) . ';';