CRM-19093 - i18n executeQuery regex pb
authorSamuel Vanhove <samuel@symbiotic.coop>
Thu, 13 Oct 2016 21:01:44 +0000 (17:01 -0400)
committerSamuel Vanhove <samuel@symbiotic.coop>
Thu, 13 Oct 2016 21:01:44 +0000 (17:01 -0400)
CRM/Core/I18n/Schema.php

index c51bcb07fe1349e161b1e77c752f491ad610aa98..2b483bde54c0702fda70bd768062678e8164c4b6 100644 (file)
@@ -361,7 +361,7 @@ class CRM_Core_I18n_Schema {
     global $dbLocale;
     $tables = self::schemaStructureTables();
     foreach ($tables as $table) {
-      $query = preg_replace("/([^'\"])({$table})([^_'\"])/", "\\1\\2{$dbLocale}\\3", $query);
+      $query = preg_replace("/([^'\"])({$table})([^a-z_'\"])/", "\\1\\2{$dbLocale}\\3", $query);
     }
     // uncomment the below to rewrite the civicrm_value_* queries
     // $query = preg_replace("/(civicrm_value_[a-z0-9_]+_\d+)([^_])/", "\\1{$dbLocale}\\2", $query);