]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/specialphrases.php
special phrases: sometimes quotes are not escaped
[nominatim.git] / utils / specialphrases.php
old mode 100755 (executable)
new mode 100644 (file)
index 7d22df5..c15b857
@@ -1,7 +1,5 @@
-#!@PHP_BIN@ -Cq
 <?php
 
-require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
 require_once(CONST_BasePath.'/lib/init-cmd.php');
 ini_set('memory_limit', '800M');
 ini_set('display_errors', 'stderr');
@@ -16,7 +14,7 @@ $aCMDOptions
   );
 getCmdOpt($_SERVER['argv'], $aCMDOptions, $aCMDResult, true, true);
 
-include(CONST_InstallPath.'/settings/phrase_settings.php');
+include(CONST_Phrase_Config);
 
 if ($aCMDResult['wiki-import']) {
     $oNormalizer = Transliterator::createFromRules(CONST_Term_Normalization_Rules);
@@ -41,7 +39,7 @@ if ($aCMDResult['wiki-import']) {
                 $sType = trim($aMatch[3]);
                 // hack around a bug where building=yes was imported with
                 // quotes into the wiki
-                $sType = preg_replace('/&quot;/', '', $sType);
+                $sType = preg_replace('/(&quot;|")/', '', $sType);
                 // sanity check, in case somebody added garbage in the wiki
                 if (preg_match('/^\\w+$/', $sClass) < 1
                     || preg_match('/^\\w+$/', $sType) < 1