Merge pull request #19044 from seamuslee001/dev_drupal_149
[civicrm-core.git] / CRM / Core / I18n.php
index 546802dd8b1a7c282a8adb280855e4c92a296194..0c560c872324b4e034831b905682d18b4321b56b 100644 (file)
@@ -590,10 +590,8 @@ class CRM_Core_I18n {
    *   True if CiviCRM is in multilingual mode.
    */
   public static function isMultilingual() {
-    return (bool) CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain',
-      CRM_Core_Config::domainID(),
-      'locales'
-    );
+    $domain = CRM_Core_BAO_Domain::getDomain();
+    return (bool) $domain->locales;
   }
 
   /**
@@ -602,11 +600,8 @@ class CRM_Core_I18n {
    * @return array|bool
    */
   public static function getMultilingual() {
-    $locales = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain',
-      CRM_Core_Config::domainID(),
-      'locales'
-    );
-    return $locales ? CRM_Core_DAO::unSerializeField($locales, CRM_Core_DAO::SERIALIZE_SEPARATOR_TRIMMED) : FALSE;
+    $domain = CRM_Core_BAO_Domain::getDomain();
+    return $domain->locales ? CRM_Core_DAO::unSerializeField($domain->locales, CRM_Core_DAO::SERIALIZE_SEPARATOR_TRIMMED) : FALSE;
   }
 
   /**