Updated smarty to 2.6.26

This commit is contained in:
Deon George
2009-11-14 03:18:37 +11:00
parent 0c92560222
commit ed846acac2
4 changed files with 65 additions and 49 deletions

View File

@@ -27,10 +27,10 @@
* @author Monte Ohrt <monte at ohrt dot com>
* @author Andrei Zmievski <andrei@php.net>
* @package Smarty
* @version 2.6.22
* @version 2.6.26
*/
/* $Id: Smarty.class.php 2785 2008-09-18 21:04:12Z Uwe.Tews $ */
/* $Id: Smarty.class.php 3163 2009-06-17 14:39:24Z monte.ohrt $ */
/**
* DIR_SEP isn't used anymore, but third party apps might
@@ -107,7 +107,7 @@ class Smarty
/**
* When set, smarty does uses this value as error_reporting-level.
*
* @var boolean
* @var integer
*/
var $error_reporting = null;
@@ -236,7 +236,8 @@ class Smarty
'INCLUDE_ANY' => false,
'PHP_TAGS' => false,
'MODIFIER_FUNCS' => array('count'),
'ALLOW_CONSTANTS' => false
'ALLOW_CONSTANTS' => false,
'ALLOW_SUPER_GLOBALS' => true
);
/**
@@ -464,7 +465,7 @@ class Smarty
*
* @var string
*/
var $_version = '2.6.22';
var $_version = '2.6.26';
/**
* current template inclusion depth
@@ -1548,7 +1549,7 @@ class Smarty
$params['source_content'] = $this->_read_file($_resource_name);
}
$params['resource_timestamp'] = filemtime($_resource_name);
$_return = is_file($_resource_name);
$_return = is_file($_resource_name) && is_readable($_resource_name);
break;
default:
@@ -1711,7 +1712,7 @@ class Smarty
*/
function _read_file($filename)
{
if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
if ( file_exists($filename) && is_readable($filename) && ($fd = @fopen($filename, 'rb')) ) {
$contents = '';
while (!feof($fd)) {
$contents .= fread($fd, 8192);
@@ -1950,7 +1951,7 @@ class Smarty
return $function;
}
}
/**#@-*/
}