Merge branch 'master' of github.com:twain47/Nominatim

This commit is contained in:
Brian Quinion
2012-03-26 23:57:24 +01:00
7 changed files with 113 additions and 76 deletions

View File

@@ -15,39 +15,8 @@
);
getCmdOpt($_SERVER['argv'], $aCMDOptions, $aCMDResult, true, true);
$aLanguageIn = array(
'af',
'ar',
'br',
'ca',
'cs',
'de',
'en',
'es',
'et',
'eu',
'fa',
'fi',
'fr',
'gl',
'hr',
'hu',
'ia',
'is',
'it',
'ja',
'mk',
'nl',
'no',
'pl',
'ps',
'pt',
'ru',
'sk',
'sv',
'uk',
'vi',
);
include(CONST_BasePath.'/settings/phrase_settings.php');
if ($aCMDResult['countries']) {
echo "select getorcreate_country(make_standard_name('uk'), 'gb');\n";
@@ -84,7 +53,17 @@
preg_match('/^\\w+$/', $sType) < 1) {
trigger_error("Bad class/type for language $sLanguage: $sClass=$sType");
exit;
}
}
# blacklisting: disallow certain class/type combinations
if (isset($aTagsBlacklist[$sClass]) && in_array($sType, $aTagsBlacklist[$sClass])) {
# fwrite(STDERR, "Blacklisted: ".$sClass."/".$sType."\n");
continue;
}
# whitelisting: if class is in whitelist, allow only tags in the list
if (isset($aTagsWhitelist[$sClass]) && !in_array($sType, $aTagsWhitelist[$sClass])) {
# fwrite(STDERR, "Non-Whitelisted: ".$sClass."/".$sType."\n");
continue;
}
$aPairs[$sClass.'|'.$sType] = array($sClass, $sType);
switch(trim($aMatch[4]))