]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-html.php
details html page: no longer use place_id in URLs
[nominatim.git] / lib / template / search-html.php
index 115f1813e1359ae7791dd65dc4cd37f1be2c25f2..c42476bff905467e1134e1565af83967e0aa4f4b 100644 (file)
         <div class="form-group search-button-group">
             <button type="submit" class="btn btn-primary btn-sm">Search</button>
             <?php if (CONST_Search_AreaPolygons) { ?>
-                <!-- <input type="checkbox" value="1" name="polygon_geojson" <?php if ($bAsGeoJSON) echo "checked='checked'"; ?>/> Highlight -->
                 <input type="hidden" value="1" name="polygon_geojson" />
             <?php } ?>
-            <input type="hidden" name="viewbox" value="<?php echo $sViewBox; ?>" />
+            <input type="hidden" name="viewbox" value="<?php if (isset($aMoreParams['viewbox'])) echo ($aMoreParams['viewbox']); ?>" />
             <div class="checkbox-inline">
-                <input type="checkbox" id="use_viewbox" <?php if ($sViewBox) echo "checked='checked'"; ?>>
+                <input type="checkbox" id="use_viewbox" <?php if (isset($aMoreParams['viewbox'])) echo "checked='checked'"; ?>>
                 <label for="use_viewbox">apply viewbox</label>
             </div>
         </div>
                     echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['class'])).')</span>';
                 else
                     echo ' <span class="type">('.ucwords(str_replace('_',' ',$aResult['type'])).')</span>';
-                echo ' <a class="btn btn-default btn-xs details" href="details.php?place_id='.$aResult['place_id'].'">details</a>';
+                echo ' <a class="btn btn-default btn-xs details" href="details.php?osmtype='.$aResult['osm_type'].'&osmid='.$aResult['osm_id'].'&class='.$aResult['class'].'">details</a>';
                 echo '</div>';
                 $i = $i+1;
             }
-            if (sizeof($aSearchResults) && $sMoreURL)
+            if (!empty($aSearchResults) && $sMoreURL)
             {
                 echo '<div class="more"><a class="btn btn-primary" href="'.htmlentities($sMoreURL).'">Search for more results</a></div>';
             }