diff --git a/NEWS b/NEWS index b7b1a34c..f68893cb 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,6 @@ - added trusted_dir functionality, documented. (Monte) - consolidated secure_dir tests to one function. (Monte) - - prepend SMARTY_DIR to default directories in class constructor. (Monte, - Ricard Pillosu) - - append _smarty_ to variable names in fetch() class function to avoid + - prepended _smarty_ to variable names in fetch() class function to avoid namespace conflicts. (Monte) - introduced $compile_id class variable that can be used to set persistent compile identifier across multiple display calls, documented. (Andrei) @@ -277,3 +275,5 @@ Version 1.0a Version 1.0 ------------ - initial release + +/* vim: set et: */ diff --git a/Smarty.class.php b/Smarty.class.php index 34bca0c1..a6339dfb 100644 --- a/Smarty.class.php +++ b/Smarty.class.php @@ -717,8 +717,8 @@ function _generate_debug_output() { Function: _is_trusted() Purpose: determines if a template is within the trusted_dir or not. \*======================================================================*/ -function _is_trusted($resource_type, $resource_name) { - +function _is_trusted($resource_type, $resource_name) +{ $_smarty_trusted = false; if (!empty($this->trusted_dir)) { // see if template file is within a trusted directory. If so, @@ -726,7 +726,7 @@ function _is_trusted($resource_type, $resource_name) { if ($resource_type == 'file') { if (is_readable ($this->trusted_dir)) { - if (substr(realpath($resource_name),0, strlen(realpath($this->trusted_dir))) == realpath($this->trusted_dir)) { + if (substr(realpath($resource_name), 0, strlen(realpath($this->trusted_dir))) == realpath($this->trusted_dir)) { $_smarty_trusted = true; } } diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index 34bca0c1..a6339dfb 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -717,8 +717,8 @@ function _generate_debug_output() { Function: _is_trusted() Purpose: determines if a template is within the trusted_dir or not. \*======================================================================*/ -function _is_trusted($resource_type, $resource_name) { - +function _is_trusted($resource_type, $resource_name) +{ $_smarty_trusted = false; if (!empty($this->trusted_dir)) { // see if template file is within a trusted directory. If so, @@ -726,7 +726,7 @@ function _is_trusted($resource_type, $resource_name) { if ($resource_type == 'file') { if (is_readable ($this->trusted_dir)) { - if (substr(realpath($resource_name),0, strlen(realpath($this->trusted_dir))) == realpath($this->trusted_dir)) { + if (substr(realpath($resource_name), 0, strlen(realpath($this->trusted_dir))) == realpath($this->trusted_dir)) { $_smarty_trusted = true; } }