mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- bugfix direct access $smarty->template_dir = 'foo'; should call Smarty::setTemplateDir() https://github.com/smarty-php/smarty/issues/121
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
===== 3.1.29-dev ===== (xx.xx.2015)
|
===== 3.1.29-dev ===== (xx.xx.2015)
|
||||||
16.12.2015
|
16.12.2015
|
||||||
- bugfix {foreach} did fail if from atrribute is a Generator class https://github.com/smarty-php/smarty/issues/128
|
- bugfix {foreach} did fail if from atrribute is a Generator class https://github.com/smarty-php/smarty/issues/128
|
||||||
|
- bugfix direct access $smarty->template_dir = 'foo'; should call Smarty::setTemplateDir() https://github.com/smarty-php/smarty/issues/121
|
||||||
|
|
||||||
15.12.2015
|
15.12.2015
|
||||||
- bugfix {$smarty.cookies.foo} did return the $_COOKIE array not the 'foo' value https://github.com/smarty-php/smarty/issues/122
|
- bugfix {$smarty.cookies.foo} did return the $_COOKIE array not the 'foo' value https://github.com/smarty-php/smarty/issues/122
|
||||||
|
@@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.29-dev/6';
|
const SMARTY_VERSION = '3.1.29-dev/7';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
@@ -683,10 +683,14 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
'direct_access_security', '_dir_perms', '_file_perms',
|
'direct_access_security', '_dir_perms', '_file_perms',
|
||||||
'plugin_search_order', 'inheritance_merge_compiled_includes');
|
'plugin_search_order', 'inheritance_merge_compiled_includes');
|
||||||
|
|
||||||
private static $accessMap = array('template_dir' => 'getTemplateDir', 'config_dir' => 'getConfigDir',
|
private static $accessMapGet = array('template_dir' => 'getTemplateDir', 'config_dir' => 'getConfigDir',
|
||||||
'plugins_dir' => 'getPluginsDir', 'compile_dir' => 'getCompileDir',
|
'plugins_dir' => 'getPluginsDir', 'compile_dir' => 'getCompileDir',
|
||||||
'cache_dir' => 'getCacheDir',);
|
'cache_dir' => 'getCacheDir',);
|
||||||
|
|
||||||
|
private static $accessMapSet = array('template_dir' => 'setTemplateDir', 'config_dir' => 'setConfigDir',
|
||||||
|
'plugins_dir' => 'setPluginsDir', 'compile_dir' => 'setCompileDir',
|
||||||
|
'cache_dir' => 'setCacheDir',);
|
||||||
|
|
||||||
/**#@-*/
|
/**#@-*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1343,8 +1347,8 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
public function __get($name)
|
public function __get($name)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (isset(self::$accessMap[$name])) {
|
if (isset(self::$accessMapGet[$name])) {
|
||||||
return $this->{self::$accessMap[$name]}();
|
return $this->{self::$accessMapGet[$name]}();
|
||||||
} elseif (in_array($name, self::$obsoleteProperties)) {
|
} elseif (in_array($name, self::$obsoleteProperties)) {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
@@ -1362,8 +1366,8 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
*/
|
*/
|
||||||
public function __set($name, $value)
|
public function __set($name, $value)
|
||||||
{
|
{
|
||||||
if (isset(self::$accessMap[$name])) {
|
if (isset(self::$accessMapSet[$name])) {
|
||||||
$this->{self::$accessMap[$name]}($value);
|
$this->{self::$accessMapSet[$name]}($value);
|
||||||
} elseif (in_array($name, self::$obsoleteProperties)) {
|
} elseif (in_array($name, self::$obsoleteProperties)) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user