Changeset 1832

Show
Ignore:
Timestamp:
04/10/08 10:47:09 (5 months ago)
Author:
fumiakiy
Message:

Fixed if - elseif - else in PHP. BugId:69678

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/release-34/php/lib/MTViewer.php

    r1799 r1832  
    239239 
    240240    function smarty_block_elseif($args, $content, &$ctx, &$repeat) { 
     241        $args['elseif'] = 1; 
    241242        return $this->smarty_block_else($args, $content, $ctx, $repeat); 
    242243    } 
     
    254255                $args['name'] = $var; 
    255256        } 
    256         if (count($args) >= 1) { # else-if case 
     257        if ( (count($args) > 1) || $args['elseif']) { 
    257258            require_once("block.mtif.php"); 
    258             $args['elseif'] = 1; 
    259259            if (!isset($content)) { 
    260260                $out = smarty_block_mtif($args, $content, $ctx, $repeat);