From f74a0d575a99bc9b0e307c2698a3756c2ac9fab1 Mon Sep 17 00:00:00 2001 From: uwetews Date: Sun, 24 Jul 2016 20:31:27 +0200 Subject: [PATCH] - regression this->addPluginsDir('/abs/path/to/dir') adding absolute path without trailing '/' did fail https://github.com/smarty-php/smarty/issues/260 --- change_log.txt | 3 +++ libs/Smarty.class.php | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/change_log.txt b/change_log.txt index 59d2d92b..9ecb8390 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 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 - bugfix setTemplateDir('/') and setTemplateDir('') did create wrong absolute filepath https://github.com/smarty-php/smarty/issues/245 - optimization of filepath normalization diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 9dd01c83..43088c11 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/(87)'; + const SMARTY_VERSION = '3.1.30-dev/(88)'; /** * define variable scopes @@ -974,9 +974,7 @@ class Smarty extends Smarty_Internal_TemplateBase $this->plugins_dir = (array) $this->plugins_dir; } 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->_pluginsDirNormalized = true;