- regression this->addPluginsDir('/abs/path/to/dir') adding absolute path without trailing '/' did fail https://github.com/smarty-php/smarty/issues/260

This commit is contained in:
uwetews
2016-07-24 20:31:27 +02:00
parent eb2d9d4e6d
commit f74a0d575a
2 changed files with 5 additions and 4 deletions

View File

@@ -1,4 +1,7 @@
 ===== 3.1.30-dev ===== (xx.xx.xx)  ===== 3.1.30-dev ===== (xx.xx.xx)
24.07.2016
- regression this->addPluginsDir('/abs/path/to/dir') adding absolute path without trailing '/' did fail https://github.com/smarty-php/smarty/issues/260
23.07.2016 23.07.2016
- bugfix setTemplateDir('/') and setTemplateDir('') did create wrong absolute filepath https://github.com/smarty-php/smarty/issues/245 - bugfix setTemplateDir('/') and setTemplateDir('') did create wrong absolute filepath https://github.com/smarty-php/smarty/issues/245
- optimization of filepath normalization - optimization of filepath normalization

View File

@@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/** /**
* smarty version * smarty version
*/ */
const SMARTY_VERSION = '3.1.30-dev/(87)'; const SMARTY_VERSION = '3.1.30-dev/(88)';
/** /**
* define variable scopes * define variable scopes
@@ -974,9 +974,7 @@ class Smarty extends Smarty_Internal_TemplateBase
$this->plugins_dir = (array) $this->plugins_dir; $this->plugins_dir = (array) $this->plugins_dir;
} }
foreach ($this->plugins_dir as $k => $v) { foreach ($this->plugins_dir as $k => $v) {
if (strpos($v, './') !== false || strpos($v, '.\\') !== false) { $this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, "/\\") . DS, true);
$this->plugins_dir[ $k ] = $this->_realpath(rtrim($v, "/\\") . DS, true);
}
} }
$this->_cache[ 'plugin_files' ] = array(); $this->_cache[ 'plugin_files' ] = array();
$this->_pluginsDirNormalized = true; $this->_pluginsDirNormalized = true;