CRM-16373 - Config - Remove `smartyDir`, `pluginsDir`, and `sqlDir`
authorTim Otten <totten@civicrm.org>
Sat, 22 Aug 2015 10:21:14 +0000 (03:21 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:45:01 +0000 (15:45 -0700)
CRM/Core/Config/Defaults.php
CRM/Core/Config/Variables.php
CRM/Core/Smarty.php

index b21a1f7bf09ce0bf632ddb7cd91e2a6535d196ef..f0f954430c647f3c165b4fad246a5f0ce7d66520 100644 (file)
@@ -45,17 +45,10 @@ class CRM_Core_Config_Defaults {
   public function setCoreVariables() {
     global $civicrm_root;
 
-    // set of base directories relying on $civicrm_root
-    $this->smartyDir = $civicrm_root . DIRECTORY_SEPARATOR . 'packages' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR;
-
-    $this->pluginsDir = $civicrm_root . DIRECTORY_SEPARATOR . 'CRM' . DIRECTORY_SEPARATOR . 'Core' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR;
-
     $this->templateDir = array(
       $civicrm_root . DIRECTORY_SEPARATOR .
       'templates' . DIRECTORY_SEPARATOR,
     );
-
-    $this->sqlDir = $civicrm_root . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR;
   }
 
   /**
index 7f69eb5001596331adc35cb63618688beee28d10..69b3737161be01ce50089b20239db7d7361c841a 100644 (file)
@@ -44,13 +44,6 @@ class CRM_Core_Config_Variables extends CRM_Core_Config_Defaults {
   public $debug = 0;
   public $backtrace = 0;
 
-  /**
-   * The directory where Smarty and plugins are installed.
-   * @var string
-   */
-  public $smartyDir = NULL;
-  public $pluginsDir = NULL;
-
   /**
    * The root directory of our template tree.
    * @var string
index 9022db85a546f22e84b5584c20fdda80fdbcec80..fb84a6c1a9d6f216366b350199e39a0e3a4b12a8 100644 (file)
@@ -128,11 +128,14 @@ class CRM_Core_Smarty extends Smarty {
       }
     }
 
+    $smartyDir = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'packages' . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR;
+    $pluginsDir = __DIR__ . DIRECTORY_SEPARATOR . 'Smarty' . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR;
+
     if ($customPluginsDir) {
-      $this->plugins_dir = array($customPluginsDir, $config->smartyDir . 'plugins', $config->pluginsDir);
+      $this->plugins_dir = array($customPluginsDir, $smartyDir . 'plugins', $pluginsDir);
     }
     else {
-      $this->plugins_dir = array($config->smartyDir . 'plugins', $config->pluginsDir);
+      $this->plugins_dir = array($smartyDir . 'plugins', $pluginsDir);
     }
 
     // add the session and the config here