Ignore:
Timestamp:
Jul 15, 2009, 1:43:44 PM (15 years ago)
Author:
patdenice
Message:

merge r3583 from branch 2.0 to trunk
Update smarty to 2.6.26

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/smarty/libs/Smarty.class.php

    r3282 r3584  
    2121 * For questions, help, comments, discussion, etc., please join the
    2222 * Smarty mailing list. Send a blank e-mail to
    23  * smarty-discussion-subscribe@googlegroups.com
     23 * smarty-discussion-subscribe@googlegroups.com 
    2424 *
    2525 * @link http://www.smarty.net/
     
    2828 * @author Andrei Zmievski <andrei@php.net>
    2929 * @package Smarty
    30  * @version 2.6.22
     30 * @version 2.6.26
    3131 */
    3232
    33 /* $Id: Smarty.class.php 2785 2008-09-18 21:04:12Z Uwe.Tews $ */
     33/* $Id: Smarty.class.php 3163 2009-06-17 14:39:24Z monte.ohrt $ */
    3434
    3535/**
     
    108108     * When set, smarty does uses this value as error_reporting-level.
    109109     *
    110      * @var boolean
     110     * @var integer
    111111     */
    112112    var $error_reporting  =  null;
     
    237237                                    'PHP_TAGS'        => false,
    238238                                    'MODIFIER_FUNCS'  => array('count'),
    239                                     'ALLOW_CONSTANTS'  => false
     239                                    'ALLOW_CONSTANTS'  => false,
     240                                    'ALLOW_SUPER_GLOBALS' => true
    240241                                   );
    241242
     
    465466     * @var string
    466467     */
    467     var $_version              = '2.6.22';
     468    var $_version              = '2.6.26';
    468469
    469470    /**
     
    10581059            // var non-existant, return valid reference
    10591060            $_tmp = null;
    1060             return $_tmp;
     1061            return $_tmp;   
    10611062        }
    10621063    }
     
    11171118    {
    11181119        static $_cache_info = array();
    1119 
     1120       
    11201121        $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
    11211122               ? $this->error_reporting : error_reporting() & ~E_NOTICE);
     
    13041305            return;
    13051306        } else {
    1306             if ($this->debugging) {
    1307                 // capture time for debugging info
    1308                 $_params = array();
    1309                 require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
    1310                 $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
    1311             }
    13121307            error_reporting($_smarty_old_error_level);
    13131308            if (isset($_smarty_results)) { return $_smarty_results; }
     
    15551550                    }
    15561551                    $params['resource_timestamp'] = filemtime($_resource_name);
    1557                     $_return = is_file($_resource_name);
     1552                    $_return = is_file($_resource_name) && is_readable($_resource_name);
    15581553                    break;
    15591554
     
    17181713    function _read_file($filename)
    17191714    {
    1720         if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
     1715        if ( file_exists($filename) && is_readable($filename) && ($fd = @fopen($filename, 'rb')) ) {
    17211716            $contents = '';
    17221717            while (!feof($fd)) {
     
    19391934        return eval($code);
    19401935    }
    1941 
     1936   
    19421937    /**
    19431938     * Extracts the filter name from the given callback
    1944      *
     1939     * 
    19451940     * @param callback $function
    19461941     * @return string
     
    19571952                }
    19581953        }
    1959 
     1954 
    19601955    /**#@-*/
    19611956
Note: See TracChangeset for help on using the changeset viewer.