summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruwetews <uwe.tews@googlemail.com>2016-07-24 20:31:27 +0200
committeruwetews <uwe.tews@googlemail.com>2016-07-24 20:31:27 +0200
commitf74a0d575a99bc9b0e307c2698a3756c2ac9fab1 (patch)
treed999c08d12ad9dc207d8bb2ebecaea4e7b129cba
parenteb2d9d4e6d0a774f4373f813f6154c637c3107ff (diff)
downloadsmarty-f74a0d575a99bc9b0e307c2698a3756c2ac9fab1.tar.gz
smarty-f74a0d575a99bc9b0e307c2698a3756c2ac9fab1.tar.bz2
smarty-f74a0d575a99bc9b0e307c2698a3756c2ac9fab1.zip
- regression this->addPluginsDir('/abs/path/to/dir') adding absolute path without trailing '/' did fail https://github.com/smarty-php/smarty/issues/260
-rw-r--r--change_log.txt3
-rw-r--r--libs/Smarty.class.php6
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;