From 136e94ae745ef7726a131574c4aeec7cf0d2b836 Mon Sep 17 00:00:00 2001 From: uwetews Date: Tue, 22 Dec 2015 01:21:35 +0100 Subject: [PATCH] - change $xxx_dir properties from private to protected in case Smarty class gets extended. Properties like $template_dir must never be accessed directly or overloaded by a user class. Use getter/setter methods like setTemplateDir() --- change_log.txt | 3 +++ libs/Smarty.class.php | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/change_log.txt b/change_log.txt index 2e1168cb..e6e3717d 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,4 +1,7 @@  ===== 3.1.30-dev ===== (xx.xx.xx) + 22.12.2015 + - change $xxx_dir properties from private to protected in case Smarty class gets extended + 21.12.2015 - bugfix a filepath starting with '/' or '\' on windows should normalize to the root dir of current working drive https://github.com/smarty-php/smarty/issues/134 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 3c1ba153..71089466 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -118,7 +118,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/3'; + const SMARTY_VERSION = '3.1.30-dev/4'; /** * define variable scopes @@ -288,7 +288,7 @@ class Smarty extends Smarty_Internal_TemplateBase * * @var array */ - private $template_dir = array('./templates/'); + protected $template_dir = array('./templates/'); /** * joined template directory string used in cache keys @@ -330,28 +330,28 @@ class Smarty extends Smarty_Internal_TemplateBase * * @var string */ - private $compile_dir = './templates_c/'; + protected $compile_dir = './templates_c/'; /** * plugins directory * * @var array */ - private $plugins_dir = null; + protected $plugins_dir = null; /** * cache directory * * @var string */ - private $cache_dir = './cache/'; + protected $cache_dir = './cache/'; /** * config directory * * @var array */ - private $config_dir = array('./configs/'); + protected $config_dir = array('./configs/'); /** * force template compiling?