Merge pull request #15602 from eileenmcnaughton/item_2
[civicrm-core.git] / CRM / Core / DAO.php
index 83dac3f4333a8f1b76dd8b3a467f3318ce9dabfc..d1b7668fee2e305b21841274695a09f8caaf3d4d 100644 (file)
@@ -1982,6 +1982,12 @@ SELECT contact_id
     // Prefer to instantiate BAO's instead of DAO's (when possible)
     // so that assignTestValue()/assignTestFK() can be overloaded.
     $baoName = str_replace('_DAO_', '_BAO_', $daoName);
+    if ($baoName === 'CRM_Financial_BAO_FinancialTrxn') {
+      // OMG OMG OMG this is so incredibly bad. The BAO is insanely named.
+      // @todo create a new class called what the BAO SHOULD be
+      // that extends BAO-crazy-name.... migrate.
+      $baoName = 'CRM_Core_BAO_FinancialTrxn';
+    }
     if (class_exists($baoName)) {
       $daoName = $baoName;
     }