Updated smarty to 2.6.26
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**#@-*/
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user