diff --git a/change_log.txt b/change_log.txt index e46f8a9f..fbdf0ab5 100644 --- a/change_log.txt +++ b/change_log.txt @@ -2,6 +2,7 @@ 05.8.2017 - bugfix wordwrap modifier could fail if used in nocache code. converted plugin file shared.mb_wordwrap.php into modifier.mb_wordwrap.php + - cleanup of _getSmartyObj() 31.7.2017 - Call clearstatcache() after mkdir() failure https://github.com/smarty-php/smarty/pull/379 diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 7b9a3a09..6916782d 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -108,7 +108,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.32-dev-17'; + const SMARTY_VERSION = '3.1.32-dev-18'; /** * define variable scopes @@ -1253,16 +1253,6 @@ class Smarty extends Smarty_Internal_TemplateBase Smarty_Internal_Template::$tplObjCache = array(); } - /** - * Get Smarty object - * - * @return Smarty - */ - public function _getSmartyObj() - { - return $this; - } - /** * @param boolean $compile_check */ diff --git a/libs/sysplugins/smarty_internal_data.php b/libs/sysplugins/smarty_internal_data.php index fd9c3020..e1724f14 100644 --- a/libs/sysplugins/smarty_internal_data.php +++ b/libs/sysplugins/smarty_internal_data.php @@ -266,7 +266,7 @@ class Smarty_Internal_Data */ public function _getSmartyObj() { - return $this->smarty; + return $this->_objType === 1 ? $this : $this->smarty; } /** diff --git a/libs/sysplugins/smarty_internal_templatebase.php b/libs/sysplugins/smarty_internal_templatebase.php index 7252f3be..1a5285ef 100644 --- a/libs/sysplugins/smarty_internal_templatebase.php +++ b/libs/sysplugins/smarty_internal_templatebase.php @@ -42,7 +42,6 @@ * @method Smarty_Internal_TemplateBase unregisterPlugin(string $type, string $name) * @method Smarty_Internal_TemplateBase unregisterFilter(string $type, mixed $callback) * @method Smarty_Internal_TemplateBase unregisterResource(string $name) - * @method Smarty _getSmartyObj() */ abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {