From: marc tobias Date: Fri, 9 Nov 2018 10:06:17 +0000 (+0000) Subject: Improved warning message when looking for optional GB postcode file X-Git-Tag: v3.3.0~75^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/07c47eed5493dc186c5873c99745d217a9f22e53?hp=-c Improved warning message when looking for optional GB postcode file --- 07c47eed5493dc186c5873c99745d217a9f22e53 diff --git a/lib/setup/SetupClass.php b/lib/setup/SetupClass.php index bd53260e..5e5b16d6 100755 --- a/lib/setup/SetupClass.php +++ b/lib/setup/SetupClass.php @@ -154,10 +154,11 @@ class SetupFunctions $this->pgsqlRunScriptFile(CONST_BasePath.'/data/country_osm_grid.sql.gz'); $this->pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_table.sql'); - if (file_exists(CONST_BasePath.'/data/gb_postcode_data.sql.gz')) { - $this->pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_data.sql.gz'); + $sPostcodeFilename = CONST_BasePath.'/data/gb_postcode_data.sql.gz'; + if (file_exists($sPostcodeFilename)) { + $this->pgsqlRunScriptFile($sPostcodeFilename); } else { - warn('external UK postcode table not found.'); + warn('optional external UK postcode table file ('.$sPostcodeFilename.') not found. Skipping.'); } if (CONST_Use_Extra_US_Postcodes) {