mirror of
https://github.com/osm-search/Nominatim.git
synced 2024-11-30 12:22:10 +03:00
20 lines
576 B
PHP
20 lines
576 B
PHP
<?php
|
|
|
|
$phpPhraseSettingsFile = $argv[1];
|
|
$jsonPhraseSettingsFile = dirname($phpPhraseSettingsFile).'/'.basename($phpPhraseSettingsFile, '.php').'.json';
|
|
|
|
if (file_exists($phpPhraseSettingsFile) && !file_exists($jsonPhraseSettingsFile)) {
|
|
include $phpPhraseSettingsFile;
|
|
|
|
$data = array();
|
|
|
|
if (isset($aTagsBlacklist))
|
|
$data['blackList'] = $aTagsBlacklist;
|
|
if (isset($aTagsWhitelist))
|
|
$data['whiteList'] = $aTagsWhitelist;
|
|
|
|
$jsonFile = fopen($jsonPhraseSettingsFile, 'w');
|
|
fwrite($jsonFile, json_encode($data));
|
|
fclose($jsonFile);
|
|
}
|