aboutsummaryrefslogtreecommitdiffstats
path: root/include/smarty/libs/Smarty.class.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2016-01-21 15:10:02 +0100
committerplegall <plg@piwigo.org>2016-01-21 15:10:02 +0100
commitd33051cb7236a930c1baf879fee75e92c35a93ee (patch)
tree4f7c596268420cc670cbbf767d941fadb07a1b26 /include/smarty/libs/Smarty.class.php
parent491464355911334ecbf49b742545286e82961112 (diff)
update to Smarty 3.1.29
Diffstat (limited to 'include/smarty/libs/Smarty.class.php')
-rw-r--r--include/smarty/libs/Smarty.class.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/include/smarty/libs/Smarty.class.php b/include/smarty/libs/Smarty.class.php
index 17457131c..a029f942e 100644
--- a/include/smarty/libs/Smarty.class.php
+++ b/include/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 {