]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/output.php
slightly relax viewbox parameter check
[nominatim.git] / lib / output.php
index 0a548500d23b19c0dc43eef361cb322da372c270..58f00091707ffbce13cc85c9ad1ed3192d701726 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
-function formatOSMType($sType, $bIncludeExternal=true)
+
+function formatOSMType($sType, $bIncludeExternal = true)
 {
     if ($sType == 'N') return 'node';
     if ($sType == 'W') return 'way';
@@ -14,7 +15,7 @@ function formatOSMType($sType, $bIncludeExternal=true)
     return '';
 }
 
-function osmLink($aFeature, $sRefText=false)
+function osmLink($aFeature, $sRefText = false)
 {
     $sOSMType = formatOSMType($aFeature['osm_type'], false);
     if ($sOSMType) {
@@ -26,16 +27,15 @@ function osmLink($aFeature, $sRefText=false)
 function wikipediaLink($aFeature)
 {
     if ($aFeature['wikipedia']) {
-        list($sLanguage, $sArticle) = explode(':',$aFeature['wikipedia']);
+        list($sLanguage, $sArticle) = explode(':', $aFeature['wikipedia']);
         return '<a href="https://'.$sLanguage.'.wikipedia.org/wiki/'.urlencode($sArticle).'" target="_blank">'.$aFeature['wikipedia'].'</a>';
     }
     return '';
 }
 
-function detailsLink($aFeature, $sTitle=false)
+function detailsLink($aFeature, $sTitle = false)
 {
     if (!$aFeature['place_id']) return '';
 
     return '<a href="details.php?place_id='.$aFeature['place_id'].'">'.($sTitle?$sTitle:$aFeature['place_id']).'</a>';
 }
-