From bb2a2bd7dedc6ba0227ccf72349135008926e97d Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 9 May 2001 13:42:40 +0000 Subject: [PATCH] Use absolute paths when requiring/including Smart components. --- Smarty.class.php | 4 ++-- libs/Smarty.class.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Smarty.class.php b/Smarty.class.php index d4650a0c..9c5885ed 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -40,7 +40,7 @@ * */ -require('Smarty.addons.php'); +require_once dirname(__FILE__) . '/Smarty.addons.php'; define("SMARTY_PHP_PASSTHRU",0); define("SMARTY_PHP_QUOTE",1); @@ -665,7 +665,7 @@ class Smarty \*======================================================================*/ function _compile_template($tpl_file, $template_source, &$template_compiled) { - include_once "Smarty_Compiler.class.php"; + include_once dirname(__FILE__) . '/Smarty_Compiler.class.php'; $smarty_compiler = new $this->compiler_class; diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index d4650a0c..9c5885ed 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -40,7 +40,7 @@ * */ -require('Smarty.addons.php'); +require_once dirname(__FILE__) . '/Smarty.addons.php'; define("SMARTY_PHP_PASSTHRU",0); define("SMARTY_PHP_QUOTE",1); @@ -665,7 +665,7 @@ class Smarty \*======================================================================*/ function _compile_template($tpl_file, $template_source, &$template_compiled) { - include_once "Smarty_Compiler.class.php"; + include_once dirname(__FILE__) . '/Smarty_Compiler.class.php'; $smarty_compiler = new $this->compiler_class;