report software version of status call

This commit is contained in:
Sarah Hoffmann
2021-03-01 16:47:19 +01:00
parent 86273f5e2a
commit 4faefe156c
2 changed files with 6 additions and 3 deletions

View File

@@ -37,7 +37,8 @@ if ($sOutputFormat == 'json') {
$aResponse = array(
'status' => 0,
'message' => 'OK',
'data_updated' => (new DateTime('@'.$epoch))->format(DateTime::RFC3339)
'data_updated' => (new DateTime('@'.$epoch))->format(DateTime::RFC3339),
'software_version' => CONST_NominatimVersion
);
javascript_renderData($aResponse);
} else {

View File

@@ -9,6 +9,7 @@ from textwrap import dedent
from psycopg2.extras import execute_values
from ..db.utils import execute_file
from ..version import NOMINATIM_VERSION
LOG = logging.getLogger()
@@ -258,9 +259,10 @@ def setup_website(basedir, phplib_dir, config):
<?php
@define('CONST_Debug', $_GET['debug'] ?? false);
@define('CONST_LibDir', '{}');
@define('CONST_LibDir', '{0}');
@define('CONST_NominatimVersion', '{1[0]}.{1[1]}.{1[2]}-{1[3]}');
""".format(phplib_dir))
""".format(phplib_dir, NOMINATIM_VERSION))
for php_name, conf_name, var_type in PHP_CONST_DEFS:
if var_type == bool: