Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7
-
Fix Version/s: 4.7.13
-
Component/s: Internationalisation
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
When doing a query containing table name that contains another table name, i18n::rewriteQuery sometimes fail to properly convert the name to the i18n equivalent.
Example that fails :
- civicrm_events_in_cart => civicrm_event_fr_CAs_in_cart (should not be changed)
- civicrm_groupprice (cf. https://github.com/zengenuity/civicrm_groupprice/issues/2) => civicrm_group_fr_CAprice (should not be changed)
My colleague Stephane has done a quick fix that will need extra testing :
CRM/Core/I18n/Schema.php:364
- $query = preg_replace("/([^'\"])({$table})([^_'\"])/", "\\1\\2{$dbLocale}\\3", $query); + $query = preg_replace("/([^'\"])({$table})([^a-z_'\"])/", "\\1\\2{$dbLocale}\\3", $query);