diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/main.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/main.php b/include/main.php index 6e7e685..512aeb7 100644 --- a/include/main.php +++ b/include/main.php @@ -39,14 +39,16 @@ require 'config.php'; if (!defined('CLIONLY')) { //ACTHUNG: Smarty3! - include 'Smarty/Smarty.class.php'; + include 'Smarty/Autoloader.php'; + Smarty_Autoloader::register(); $smarty = new Smarty(); - $smarty->template_dir = 'smarty/templates/rpmphp'; - $smarty->compile_dir = 'smarty/templates_c'; - $smarty->cache_dir = 'smarty/cache'; - $smarty->config_dir = 'smarty/configs'; + $top = dirname(__DIR__); + $smarty->setTemplateDir ($top . '/smarty/templates/rpmphp'); + $smarty->setCompileDir($top . '/smarty/templates_c'); + $smarty->setCacheDir($top . '/smarty/cache'); + $smarty->setConfigDir($top . '/smarty/configs'); $ariane[] = array ( 'url' => './', @@ -63,7 +65,7 @@ if (!defined('CLIONLY')) { */ function myAutoload($classname) { - include dirname(__FILE__).'/../class/'.$classname.'.php'; + include dirname(__DIR__).'/class/'.$classname.'.php'; } spl_autoload_register("myAutoload"); |