pixmicat - Diff between revs 436 and 438

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 436 Rev 438
Line 8... Line 8...
8 Artistic License. 8 Artistic License.
9 A more detailed definition of the terms please refer to the attached "LICENSE" 9 A more detailed definition of the terms please refer to the attached "LICENSE"
10 file. If you do not receive the program with The Artistic License copy, please 10 file. If you do not receive the program with The Artistic License copy, please
11 visit http://pixmicat.openfoundry.org/license/ to obtain a copy. 11 visit http://pixmicat.openfoundry.org/license/ to obtain a copy.
12 12
13 $Id: lib_pte.php 429 2007-06-06 10:02:16Z roytam1 $ -  
-   13 $Id: lib_pte.php 437 2007-06-18 12:57:21Z roytam1 $
14 */ 14 */
15 15
16 class PTELibrary{ 16 class PTELibrary{
17         var $tpl_block, $tpl; 17         var $tpl_block, $tpl;
18 18
Line 51... Line 51...
51         function EvalIF($tpl, $ary){ 51         function EvalIF($tpl, $ary){
52                 $tmp_tpl = $tpl; 52                 $tmp_tpl = $tpl;
53                 if(preg_match_all('/<!--&IF\(([\$&].*),\'(.*)\',\'(.*)\'\)-->/smU', $tmp_tpl, $matches, PREG_SET_ORDER)){ 53                 if(preg_match_all('/<!--&IF\(([\$&].*),\'(.*)\',\'(.*)\'\)-->/smU', $tmp_tpl, $matches, PREG_SET_ORDER)){
54                         foreach($matches as $submatches){ 54                         foreach($matches as $submatches){
55                                 $isblock = substr($submatches[1],0,1) == "&"; $vari = substr($submatches[1],1); $iftrue = $submatches[2]; $iffalse = $submatches[3]; 55                                 $isblock = substr($submatches[1],0,1) == "&"; $vari = substr($submatches[1],1); $iftrue = $submatches[2]; $iffalse = $submatches[3];
56                                 $tmp_tpl = @str_replace($submatches[0], ($isblock ? $this->BlockValue($vari) : array_key_exists('{$'.$vari.'}',$ary) ? $this->EvalInclude($iftrue, $ary) : $this->EvalInclude($iffalse, $ary)), $tmp_tpl); -  
-   56                                 $tmp_tpl = @str_replace($submatches[0], (($isblock ? $this->BlockValue($vari) : ($ary['{$'.$vari.'}'] !== '' && $ary['{$'.$vari.'}'] !== false && $ary['{$'.$vari.'}'] !== null)) ? $this->EvalInclude($iftrue, $ary) : $this->EvalInclude($iffalse, $ary)), $tmp_tpl);
57                         } 57                         }
58                 } 58                 }
59                 return $tmp_tpl; 59                 return $tmp_tpl;
60         } 60         }
61         /* 解析FOREACH敘述 */ 61         /* 解析FOREACH敘述 */