diff --git a/lib-php/Status.php b/lib-php/Status.php index a276c4d5..2d9e78db 100644 --- a/lib-php/Status.php +++ b/lib-php/Status.php @@ -56,4 +56,10 @@ class Status return $iDataDateEpoch; } + + public function databaseVersion() + { + $sSQL = 'SELECT value FROM nominatim_properties WHERE property = \'database_version\''; + return $this->oDB->getOne($sSQL); + } } diff --git a/lib-php/website/status.php b/lib-php/website/status.php index 3bb2ffa1..7c7eb928 100644 --- a/lib-php/website/status.php +++ b/lib-php/website/status.php @@ -40,6 +40,10 @@ if ($sOutputFormat == 'json') { 'data_updated' => (new DateTime('@'.$epoch))->format(DateTime::RFC3339), 'software_version' => CONST_NominatimVersion ); + $sDatabaseVersion = $oStatus->databaseVersion(); + if ($sDatabaseVersion) { + $aResponse['database_version'] = $sDatabaseVersion; + } javascript_renderData($aResponse); } else { echo 'OK';