CRM_Core_Smarty - Fix loading with alternate packages path
authorTim Otten <totten@civicrm.org>
Wed, 15 Jan 2020 21:41:54 +0000 (13:41 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 28 Jan 2020 22:52:07 +0000 (14:52 -0800)
CRM/Core/Smarty.php

index c6403d59344ba8d66bb76fde82fc38be492c5a7e..ef0fc4dab07e77a69801ce21744598b9f55726c7 100644 (file)
@@ -118,7 +118,8 @@ class CRM_Core_Smarty extends Smarty {
       }
     }
 
-    $smartyDir = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'packages' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR;
+    $pkgsDir = Civi::paths()->getVariable('civicrm.packages', 'path');
+    $smartyDir = $pkgsDir . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR;
     $pluginsDir = __DIR__ . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR;
 
     if ($customPluginsDir) {