From 1be373d489817ff91e077c97ac91779ebc1c8e22 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 14 Dec 2015 07:42:16 +0100 Subject: fix for smarty 3.1.28 --- include/main.php | 14 ++++++++------ 1 file 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"); -- cgit