Skip to content

Commit

Permalink
Merge pull request #13465 from mlutfy/setLocale
Browse files Browse the repository at this point in the history
setLocale: precaution for when setLocale is called on an unilingual site
  • Loading branch information
colemanw authored Jan 15, 2019
2 parents 1130d03 + 6b08414 commit b105d55
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CRM/Core/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,12 @@ public function setLocale($locale) {
$this->setPhpGettextLocale($locale);
}

// for sql queries
// For sql queries, if running in DB multi-lingual mode.
global $dbLocale;
$dbLocale = "_{$locale}";

if ($dbLocale) {
$dbLocale = "_{$locale}";
}

// For self::getLocale()
global $tsLocale;
Expand Down

0 comments on commit b105d55

Please sign in to comment.