diff options
author | Remi Collet <fedora@famillecollet.com> | 2015-12-14 07:42:16 +0100 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2015-12-14 07:42:16 +0100 |
commit | 1be373d489817ff91e077c97ac91779ebc1c8e22 (patch) | |
tree | d89d844f0d4b769f0bebc2a2faeb1898cdd8949a /include | |
parent | 3f6fa98c008a915e53f251792292e6983ec4fd1e (diff) |
fix for smarty 3.1.28
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"); |