diff options
author | Wave <wave72@users.noreply.github.com> | 2016-07-22 10:55:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 10:55:02 +0200 |
commit | 744ad84714fe0f7a3d90250a4ff02dc4327b9061 (patch) | |
tree | 595fb74ec9ea0bc7130d18bd7993d719a222d343 /library/Smarty/libs/Smarty.class.php | |
parent | c38c79d71c8ef70ef649f83e322f1984b75ee2dd (diff) | |
parent | 7d897a3f03bd57ed556433eb84a41963ba44e02e (diff) | |
download | volse-hubzilla-744ad84714fe0f7a3d90250a4ff02dc4327b9061.tar.gz volse-hubzilla-744ad84714fe0f7a3d90250a4ff02dc4327b9061.tar.bz2 volse-hubzilla-744ad84714fe0f7a3d90250a4ff02dc4327b9061.zip |
Merge pull request #6 from redmatrix/dev
Dev
Diffstat (limited to 'library/Smarty/libs/Smarty.class.php')
-rw-r--r-- | library/Smarty/libs/Smarty.class.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/library/Smarty/libs/Smarty.class.php b/library/Smarty/libs/Smarty.class.php index 17457131c..a029f942e 100644 --- a/library/Smarty/libs/Smarty.class.php +++ b/library/Smarty/libs/Smarty.class.php @@ -27,7 +27,7 @@ * @author Uwe Tews * @author Rodney Rehm * @package Smarty - * @version 3.1.28 + * @version 3.1.29 */ /** @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.28'; + const SMARTY_VERSION = '3.1.29'; /** * define variable scopes @@ -677,15 +677,20 @@ class Smarty extends Smarty_Internal_TemplateBase /** * removed properties * - * @var array + * @var string[] */ private static $obsoleteProperties = array('resource_caching', 'template_resource_caching', 'direct_access_security', '_dir_perms', '_file_perms', 'plugin_search_order', 'inheritance_merge_compiled_includes'); - private static $accessMap = array('template_dir' => 'getTemplateDir', 'config_dir' => 'getConfigDir', - 'plugins_dir' => 'getPluginsDir', 'compile_dir' => 'getCompileDir', - 'cache_dir' => 'getCacheDir',); + /** + * List of private properties which will call getter/setter ona direct access + * + * @var array + */ + private static $accessMap = array('template_dir' => 'TemplateDir', 'config_dir' => 'ConfigDir', + 'plugins_dir' => 'PluginsDir', 'compile_dir' => 'CompileDir', + 'cache_dir' => 'CacheDir',); /**#@-*/ @@ -1173,7 +1178,7 @@ class Smarty extends Smarty_Internal_TemplateBase $path = str_replace($nds, DS, $path); } - if ($realpath === true && $path[0] !== '/' && $path[1] !== ':') { + if ($realpath === true && (($path[0] !== '/' && DS == '/') || ($path[1] !== ':' && DS != '/'))) { $path = getcwd() . DS . $path; } while ((strpos($path, '.' . DS) !== false) || (strpos($path, DS . DS) !== false)) { @@ -1344,7 +1349,8 @@ class Smarty extends Smarty_Internal_TemplateBase { if (isset(self::$accessMap[$name])) { - return $this->{self::$accessMap[$name]}(); + $method = 'get' . self::$accessMap[$name]; + return $this->{$method}(); } elseif (in_array($name, self::$obsoleteProperties)) { return null; } else { @@ -1363,7 +1369,8 @@ class Smarty extends Smarty_Internal_TemplateBase public function __set($name, $value) { if (isset(self::$accessMap[$name])) { - $this->{self::$accessMap[$name]}($value); + $method = 'set' . self::$accessMap[$name]; + $this->{$method}($value); } elseif (in_array($name, self::$obsoleteProperties)) { return; } else { |