aboutsummaryrefslogtreecommitdiffstats
path: root/library/Smarty/libs/Smarty.class.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2016-04-23 21:24:22 +0200
committerMario Vavti <mario@mariovavti.com>2016-04-23 21:24:22 +0200
commit7e30c1dd823686eb8e59e6e1c171a751e8af2d49 (patch)
tree9a0dee0a26572e21f5576bcddbc2c4d4b905aa23 /library/Smarty/libs/Smarty.class.php
parent78bf4564f20df20ec8d9025c974e25546e95bf69 (diff)
downloadvolse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.tar.gz
volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.tar.bz2
volse-hubzilla-7e30c1dd823686eb8e59e6e1c171a751e8af2d49.zip
update smarty to version 3.1.29
Diffstat (limited to 'library/Smarty/libs/Smarty.class.php')
-rw-r--r--library/Smarty/libs/Smarty.class.php25
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 {