Changeset 837

Show
Ignore:
Timestamp:
12/05/06 21:58:54 (2 years ago)
Author:
bchoate
Message:

Added more patterns to test for conditional-style tags.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/wheeljack/php/lib/MTViewer.php

    r821 r837  
    1515 
    1616    var $conditionals = array( 
    17         'MTEntryPrevious' => 1, 
    18         'MTEntryNext' => 1, 
    19         'MTDateHeader' => 1, 
    20         'MTDateFooter' => 1, 
    21         'MTEntriesHeader' => 1, 
    22         'MTEntriesFooter' => 1, 
    23         'MTCalendarWeekHeader' => 1, 
    24         'MTCalendarWeekFooter' => 1, 
    2517        'MTParentCategory' => 1, 
    26         'MTSubCatIsFirst' => 1, 
    27         'MTSubCatIsLast' => 1, 
    28         'MTHasSubCategories' => 1, 
    29         'MTHasNoSubCategories' => 1, 
    30         'MTHasParentCategory' => 1, 
    31         'MTHasNoParentCategory' => 1, 
    3218        'MTTopLevelParent' => 1, 
    3319    ); 
     
    259245    function tag($tag, $args = array()) { 
    260246        $tag = preg_replace('/^MT/', '', $tag); 
    261         if ((array_key_exists('MT' . $tag, $this->conditionals)) || (preg_match('/^If/', $tag) || preg_match('/[a-z]If[A-Z]/', $tag))) { 
     247        if ((array_key_exists('MT' . $tag, $this->conditionals)) || (preg_match('/^If/', $tag) || preg_match('/[a-z](If|Has|Is)[A-Z]/', $tag) || preg_match('/[a-z](Header|Footer|Previous|Next)$/', $tag))) { 
    262248            @require_once("block.MT$tag.php"); 
    263249            $fntag = 'smarty_block_MT' . $tag;