aboutsummaryrefslogtreecommitdiffstats
path: root/include/smarty/libs/Smarty.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/smarty/libs/Smarty.class.php')
-rw-r--r--include/smarty/libs/Smarty.class.php33
1 files changed, 14 insertions, 19 deletions
diff --git a/include/smarty/libs/Smarty.class.php b/include/smarty/libs/Smarty.class.php
index 8e56346f9..e7298f2ec 100644
--- a/include/smarty/libs/Smarty.class.php
+++ b/include/smarty/libs/Smarty.class.php
@@ -20,17 +20,17 @@
*
* For questions, help, comments, discussion, etc., please join the
* Smarty mailing list. Send a blank e-mail to
- * smarty-discussion-subscribe@googlegroups.com
+ * smarty-discussion-subscribe@googlegroups.com
*
* @link http://www.smarty.net/
* @copyright 2001-2005 New Digital Group, Inc.
* @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
@@ -1057,7 +1058,7 @@ class Smarty
} else {
// var non-existant, return valid reference
$_tmp = null;
- return $_tmp;
+ return $_tmp;
}
}
@@ -1116,7 +1117,7 @@ class Smarty
function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)
{
static $_cache_info = array();
-
+
$_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
? $this->error_reporting : error_reporting() & ~E_NOTICE);
@@ -1303,12 +1304,6 @@ class Smarty
error_reporting($_smarty_old_error_level);
return;
} else {
- if ($this->debugging) {
- // capture time for debugging info
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
- }
error_reporting($_smarty_old_error_level);
if (isset($_smarty_results)) { return $_smarty_results; }
}
@@ -1554,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:
@@ -1717,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);
@@ -1938,10 +1933,10 @@ class Smarty
{
return eval($code);
}
-
+
/**
* Extracts the filter name from the given callback
- *
+ *
* @param callback $function
* @return string
*/
@@ -1956,7 +1951,7 @@ class Smarty
return $function;
}
}
-
+
/**#@-*/
}