Merge pull request #18270 from seamuslee001/auto_dsn
[civicrm-core.git] / CRM / Logging / ReportDetail.php
index d5822b183d515cae25111a9e4606447c52bacda1..fdbd92216a895882e7e64861f067e6119585fb40 100644 (file)
@@ -257,7 +257,8 @@ class CRM_Logging_ReportDetail extends CRM_Report_Form {
    * Store the dsn for the logging database in $this->db.
    */
   protected function storeDB() {
-    $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
+    $dsn = defined('CIVICRM_LOGGING_DSN') ? CRM_Utils_SQL::autoSwitchDSN(CIVICRM_LOGGING_DSN) : CRM_Utils_SQL::autoSwitchDSN(CIVICRM_DSN);
+    $dsn = DB::parseDSN($dsn);
     $this->db = $dsn['database'];
   }