summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-12-14 07:42:16 +0100
committerRemi Collet <fedora@famillecollet.com>2015-12-14 07:42:16 +0100
commit1be373d489817ff91e077c97ac91779ebc1c8e22 (patch)
treed89d844f0d4b769f0bebc2a2faeb1898cdd8949a
parent3f6fa98c008a915e53f251792292e6983ec4fd1e (diff)
fix for smarty 3.1.28
-rw-r--r--include/main.php14
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");