- allow that plugins_dir folder names can end without directory separator

This commit is contained in:
Uwe.Tews
2009-05-06 07:46:08 +00:00
parent d7a8731ac9
commit ff4619801a
2 changed files with 9 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
05/06/2009
- allow that plugins_dir folder names can end without directory separator
05/05/2009
- fixed E_STRICT incompabilities
- {function} tag bug fix

View File

@@ -114,11 +114,11 @@ class Smarty extends Smarty_Internal_TemplateBase {
public $debug_tpl = null;
public $request_use_auto_globals = true;
// When set, smarty does uses this value as error_reporting-level.
public $error_reporting = null;
public $error_reporting = null;
// config var settings
public $config_overwrite = true; //Controls whether variables with the same name overwrite each other.
public $config_booleanize = true; //Controls whether config values of on/true/yes and off/false/no get converted to boolean
public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file.
public $config_read_hidden = true; //Controls whether hidden config sections/vars are read from the file.
// config vars
public $config_vars = array();
// assigned tpl vars
@@ -449,6 +449,10 @@ class Smarty extends Smarty_Internal_TemplateBase {
}
// loop through plugin dirs and find the plugin
foreach((array)$this->plugins_dir as $_plugin_dir) {
if (substr($_plugin_dir, -1) != DIRECTORY_SEPARATOR) {
$_plugin_dir .= DIRECTORY_SEPARATOR;
}
if (file_exists($_plugin_dir . $_plugin_filename)) {
require_once($_plugin_dir . $_plugin_filename);
return true;