From 16053e81bf9dacc9761de3c833edd0d1c5b20831 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 1 Jul 2017 23:16:01 +0200 Subject: [PATCH] show address tags and postcode in details --- lib/template/details-html.php | 2 ++ website/details.php | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/lib/template/details-html.php b/lib/template/details-html.php index 46b6a50c..76818395 100644 --- a/lib/template/details-html.php +++ b/lib/template/details-html.php @@ -124,6 +124,8 @@ kv('Wikipedia Calculated' , wikipediaLink($aPointDetails) ); } + kv('Computed Postcode', $aPointDetails['postcode']); + kv('Address Tags' , hash_to_subtable($aPointDetails['aAddressTags']) ); kv('Extra Tags' , hash_to_subtable($aPointDetails['aExtraTags']) ); ?> diff --git a/website/details.php b/website/details.php index 7f0a951f..5b52e2cc 100755 --- a/website/details.php +++ b/website/details.php @@ -130,6 +130,13 @@ if (PEAR::isError($aPointDetails['aNames'])) { // possible timeout $aPointDetails['aNames'] = []; } +// Address tags +$sSQL = "SELECT (each(address)).key as key,(each(address)).value FROM placex WHERE place_id = $iPlaceID ORDER BY key"; +$aPointDetails['aAddressTags'] = $oDB->getAssoc($sSQL); +if (PEAR::isError($aPointDetails['aAddressTags'])) { // possible timeout + $aPointDetails['aAddressTags'] = []; +} + // Extra tags $sSQL = "SELECT (each(extratags)).key,(each(extratags)).value FROM placex WHERE place_id = $iPlaceID ORDER BY (each(extratags)).key"; $aPointDetails['aExtraTags'] = $oDB->getAssoc($sSQL); -- 2.45.1