]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
Merge branch 'mobile-responsive' of https://github.com/mtmail/Nominatim into mobile...
[nominatim.git] / website / search.php
index b18c391ea2f62aaa470371358a1547f5e6b0cb43..6b58443cd1e670a8d6c295bc1aa3698463fe151a 100755 (executable)
        $fLat = CONST_Default_Lat;
        $fLon = CONST_Default_Lon;
        $iZoom = CONST_Default_Zoom;
-       $sSuggestionURL = false;
 
        $oGeocode =& new Geocode($oDB);
 
        $aLangPrefOrder = getPreferredLanguages();
        $oGeocode->setLanguagePreference($aLangPrefOrder);
 
-       if (isset($aLangPrefOrder['name:de'])) $oGeocode->setReverseInPlan(true);
-       if (isset($aLangPrefOrder['name:ru'])) $oGeocode->setReverseInPlan(true);
-       if (isset($aLangPrefOrder['name:ja'])) $oGeocode->setReverseInPlan(true);
-       if (isset($aLangPrefOrder['name:pl'])) $oGeocode->setReverseInPlan(true);
+       if (CONST_Search_ReversePlanForAll
+               || isset($aLangPrefOrder['name:de'])
+               || isset($aLangPrefOrder['name:ru'])
+               || isset($aLangPrefOrder['name:ja'])
+               || isset($aLangPrefOrder['name:pl']))
+       {
+               $oGeocode->setReverseInPlan(true);
+       }
 
        // Format for output
        $sOutputFormat = 'html';
        $bShowPolygons = (isset($_GET['polygon']) && $_GET['polygon']);
        $aExcludePlaceIDs = $oGeocode->getExcludedPlaceIDs();
 
-       $sMoreURL = CONST_Website_BaseURL.'search?format='.urlencode($sOutputFormat).'&exclude_place_ids='.join(',',$oGeocode->getExcludedPlaceIDs());
+       $sMoreURL = CONST_Website_BaseURL.'search.php?format='.urlencode($sOutputFormat).'&exclude_place_ids='.join(',',$oGeocode->getExcludedPlaceIDs());
        if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) $sMoreURL .= '&accept-language='.$_SERVER["HTTP_ACCEPT_LANGUAGE"];
        if ($bShowPolygons) $sMoreURL .= '&polygon=1';
        if ($oGeocode->getIncludeAddressDetails()) $sMoreURL .= '&addressdetails=1';