Changeset 2538


Ignore:
Timestamp:
Sep 16, 2008, 12:17:20 PM (16 years ago)
Author:
rvelices
Message:
  • upgrade smarty to latest release 2.6.20
Location:
trunk/include/smarty
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/smarty/NEWS

    r2216 r2538  
     1Version 2.6.20 (Aug 15th, 2008)
     2-------------------------------
     3
     4- fix cache tag bug when multiple cache tags on a page (mankyd,
     5  mohrt)
     6- fix /e tag checking when using arrays with regex_replace
     7  (mohrt)
     8- fix that function results can be used with condition like "is even" in
     9  {if} tags (U.Tews)
     10- fix handling of non-empty <pre>-tags and empty <textarea>- and
     11  <script>-tags (Spuerhund, messju)
     12
    113Version 2.6.19 (Feb 11th, 2008)
    214-------------------------------
  • trunk/include/smarty/README

    r2216 r2538  
    33    Smarty - the PHP compiling template engine
    44
    5 VERSION: 2.6.19
     5VERSION: 2.6.20
    66
    77AUTHORS:
  • trunk/include/smarty/libs/Config_File.class.php

    • Property svn:keywords changed from Author Date Id Revision to Author Date Revision
    r2216 r2538  
    1919 *
    2020 * @link http://smarty.php.net/
    21  * @version 2.6.19
     21 * @version 2.6.20
    2222 * @copyright Copyright: 2001-2005 New Digital Group, Inc.
    2323 * @author Andrei Zmievski <andrei@php.net>
     
    2626 */
    2727
    28 /* $Id$ */
     28/* $Id: Config_File.class.php 2702 2007-03-08 19:11:22Z mohrt $ */
    2929
    3030/**
  • trunk/include/smarty/libs/Smarty.class.php

    • Property svn:keywords changed from Author Date Id Revision to Author Date Revision
    r2231 r2538  
    2828 * @author Andrei Zmievski <andrei@php.net>
    2929 * @package Smarty
    30  * @version 2.6.19
     30 * @version 2.6.20
    3131 */
    3232
    33 /* $Id$ */
     33/* $Id: Smarty.class.php 2722 2007-06-18 14:29:00Z danilo $ */
    3434
    3535/**
     
    465465     * @var string
    466466     */
    467     var $_version              = '2.6.19';
     467    var $_version              = '2.6.20';
    468468
    469469    /**
     
    10581058            // var non-existant, return valid reference
    10591059            $_tmp = null;
    1060             return $_tmp;
     1060            return $_tmp;   
    10611061        }
    10621062    }
     
    11171117    {
    11181118        static $_cache_info = array();
    1119 
     1119       
    11201120        $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
    11211121               ? $this->error_reporting : error_reporting() & ~E_NOTICE);
     
    19411941        return eval($code);
    19421942    }
    1943 
     1943   
    19441944    /**
    19451945     * Extracts the filter name from the given callback
    1946      *
     1946     * 
    19471947     * @param callback $function
    19481948     * @return string
     
    19591959                }
    19601960        }
    1961 
     1961   
    19621962    /**#@-*/
    19631963
  • trunk/include/smarty/libs/Smarty_Compiler.class.php

    • Property svn:keywords changed from Author Date Id Revision to Author Date Revision
    r2216 r2538  
    2222 * @author Monte Ohrt <monte at ohrt dot com>
    2323 * @author Andrei Zmievski <andrei@php.net>
    24  * @version 2.6.19
     24 * @version 2.6.20
    2525 * @copyright 2001-2005 New Digital Group, Inc.
    2626 * @package Smarty
    2727 */
    2828
    29 /* $Id$ */
     29/* $Id: Smarty_Compiler.class.php 2773 2008-08-12 18:17:51Z Uwe.Tews $ */
    3030
    3131/**
     
    13641364                       expression. The start of the expression is on the stack.
    13651365                       Otherwise, we operate on the last encountered token. */
    1366                     if ($tokens[$i-1] == ')')
     1366                    if ($tokens[$i-1] == ')') {
    13671367                        $is_arg_start = array_pop($is_arg_stack);
    1368                     else
     1368                        if ($is_arg_start != 0) {
     1369                            if (preg_match('~^' . $this->_func_regexp . '$~', $tokens[$is_arg_start-1])) {
     1370                                $is_arg_start--;
     1371                            }
     1372                        }
     1373                    } else
    13691374                        $is_arg_start = $i-1;
    13701375                    /* Construct the argument for 'is' expression, so it knows
  • trunk/include/smarty/libs/internals/core.process_compiled_include.php

    r2216 r2538  
    2626    }
    2727
    28     foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
     28    foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
    2929        $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
    3030                                         array(&$smarty, '_process_compiled_include_callback'),
  • trunk/include/smarty/libs/plugins/modifier.regex_replace.php

    r2216 r2538  
    2323function smarty_modifier_regex_replace($string, $search, $replace)
    2424{
     25    if(is_array($search)) {
     26      foreach($search as $idx => $s)
     27        $search[$idx] = _smarty_regex_replace_check($s);
     28    } else {
     29      $search = _smarty_regex_replace_check($search);
     30    }       
     31
     32    return preg_replace($search, $replace, $string);
     33}
     34
     35function _smarty_regex_replace_check($search)
     36{
    2537    if (($pos = strpos($search,"\0")) !== false)
    2638      $search = substr($search,0,$pos);
     
    2941        $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
    3042    }
    31        
    32     return preg_replace($search, $replace, $string);
     43    return $search;
    3344}
    3445
  • trunk/include/smarty/libs/plugins/outputfilter.trimwhitespace.php

    r2216 r2538  
    2929{
    3030    // Pull out the script blocks
    31     preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
     31    preg_match_all("!<script[^>]*?>.*?</script>!is", $source, $match);
    3232    $_script_blocks = $match[0];
    33     $source = preg_replace("!<script[^>]+>.*?</script>!is",
     33    $source = preg_replace("!<script[^>]*?>.*?</script>!is",
    3434                           '@@@SMARTY:TRIM:SCRIPT@@@', $source);
    3535
    3636    // Pull out the pre blocks
    37     preg_match_all("!<pre>.*?</pre>!is", $source, $match);
     37    preg_match_all("!<pre[^>]*?>.*?</pre>!is", $source, $match);
    3838    $_pre_blocks = $match[0];
    39     $source = preg_replace("!<pre>.*?</pre>!is",
     39    $source = preg_replace("!<pre[^>]*?>.*?</pre>!is",
    4040                           '@@@SMARTY:TRIM:PRE@@@', $source);
    41 
     41   
    4242    // Pull out the textarea blocks
    43     preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
     43    preg_match_all("!<textarea[^>]*?>.*?</textarea>!is", $source, $match);
    4444    $_textarea_blocks = $match[0];
    45     $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is",
     45    $source = preg_replace("!<textarea[^>]*?>.*?</textarea>!is",
    4646                           '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
    4747
Note: See TracChangeset for help on using the changeset viewer.