Merge pull request #1233 from mtmail/better-gbpostcode-setup-warning

Improved warning message when looking for optional GB postcode file
This commit is contained in:
Sarah Hoffmann
2018-11-15 23:28:04 +01:00
committed by GitHub

View File

@@ -154,10 +154,11 @@ class SetupFunctions
$this->pgsqlRunScriptFile(CONST_BasePath.'/data/country_osm_grid.sql.gz'); $this->pgsqlRunScriptFile(CONST_BasePath.'/data/country_osm_grid.sql.gz');
$this->pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_table.sql'); $this->pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_table.sql');
if (file_exists(CONST_BasePath.'/data/gb_postcode_data.sql.gz')) { $sPostcodeFilename = CONST_BasePath.'/data/gb_postcode_data.sql.gz';
$this->pgsqlRunScriptFile(CONST_BasePath.'/data/gb_postcode_data.sql.gz'); if (file_exists($sPostcodeFilename)) {
$this->pgsqlRunScriptFile($sPostcodeFilename);
} else { } 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) { if (CONST_Use_Extra_US_Postcodes) {