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;
}
/**
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
}
}
+ $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