mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
Formatting.
This commit is contained in:
6
NEWS
6
NEWS
@@ -1,8 +1,6 @@
|
|||||||
- added trusted_dir functionality, documented. (Monte)
|
- added trusted_dir functionality, documented. (Monte)
|
||||||
- consolidated secure_dir tests to one function. (Monte)
|
- consolidated secure_dir tests to one function. (Monte)
|
||||||
- prepend SMARTY_DIR to default directories in class constructor. (Monte,
|
- prepended _smarty_ to variable names in fetch() class function to avoid
|
||||||
Ricard Pillosu)
|
|
||||||
- append _smarty_ to variable names in fetch() class function to avoid
|
|
||||||
namespace conflicts. (Monte)
|
namespace conflicts. (Monte)
|
||||||
- introduced $compile_id class variable that can be used to set persistent
|
- introduced $compile_id class variable that can be used to set persistent
|
||||||
compile identifier across multiple display calls, documented. (Andrei)
|
compile identifier across multiple display calls, documented. (Andrei)
|
||||||
@@ -277,3 +275,5 @@ Version 1.0a
|
|||||||
Version 1.0
|
Version 1.0
|
||||||
------------
|
------------
|
||||||
- initial release
|
- initial release
|
||||||
|
|
||||||
|
/* vim: set et: */
|
||||||
|
@@ -717,8 +717,8 @@ function _generate_debug_output() {
|
|||||||
Function: _is_trusted()
|
Function: _is_trusted()
|
||||||
Purpose: determines if a template is within the trusted_dir or not.
|
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;
|
$_smarty_trusted = false;
|
||||||
if (!empty($this->trusted_dir)) {
|
if (!empty($this->trusted_dir)) {
|
||||||
// see if template file is within a trusted directory. If so,
|
// 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 ($resource_type == 'file') {
|
||||||
if (is_readable ($this->trusted_dir)) {
|
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;
|
$_smarty_trusted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -717,8 +717,8 @@ function _generate_debug_output() {
|
|||||||
Function: _is_trusted()
|
Function: _is_trusted()
|
||||||
Purpose: determines if a template is within the trusted_dir or not.
|
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;
|
$_smarty_trusted = false;
|
||||||
if (!empty($this->trusted_dir)) {
|
if (!empty($this->trusted_dir)) {
|
||||||
// see if template file is within a trusted directory. If so,
|
// 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 ($resource_type == 'file') {
|
||||||
if (is_readable ($this->trusted_dir)) {
|
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;
|
$_smarty_trusted = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user