Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19093

executeQuery in i18n regex not working 100%

    Details

    • 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 :

      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);
      

        Attachments

          Activity

            People

            • Assignee:
              samuelsov Samuel Vanhove
              Reporter:
              samuelsov Samuel Vanhove
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: