pixmicat

Subversion Repositories:
Compare Path: Rev
With Path: Rev
/PTE @ 436  →  /PTE @ 438

Property changes:

Name: svn:keywords
+ Id

/PTE/PTE.pm
@@ -79,7 +79,7 @@
push @statement, $&; push @isblock, (substr($1,0,1) eq '&'); push @vari, substr($1,1); push @iftrue, $2; push @iffalse, $3;
}
for(my $i=0;$i<=$#statement;$i++) {
$tmp_tpl = $this->str_replace($statement[$i], ($isblock[$i] ? $this->BlockValue($vari[$i]) : exists $$ary{'{$'.$vari[$i].'}'})?$this->EvalInclude($iftrue[$i],$ary):$this->EvalInclude($iffalse[$i],$ary), $tmp_tpl);
$tmp_tpl = $this->str_replace($statement[$i], (($isblock[$i] ? $this->BlockValue($vari[$i]) : ($$ary{'{$'.$vari[$i].'}'} ne ''))?$this->EvalInclude($iftrue[$i],$ary):$this->EvalInclude($iffalse[$i],$ary)), $tmp_tpl);
}
return $tmp_tpl;
}
/PTE/lib_pte.php
@@ -10,7 +10,7 @@
file. If you do not receive the program with The Artistic License copy, please
visit http://pixmicat.openfoundry.org/license/ to obtain a copy.
 
$Id: lib_pte.php 429 2007-06-06 10:02:16Z roytam1 $
$Id: lib_pte.php 437 2007-06-18 12:57:21Z roytam1 $
*/
 
class PTELibrary{
@@ -53,7 +53,7 @@
if(preg_match_all('/<!--&IF\(([\$&].*),\'(.*)\',\'(.*)\'\)-->/smU', $tmp_tpl, $matches, PREG_SET_ORDER)){
foreach($matches as $submatches){
$isblock = substr($submatches[1],0,1) == "&"; $vari = substr($submatches[1],1); $iftrue = $submatches[2]; $iffalse = $submatches[3];
$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);
$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);
}
}
return $tmp_tpl;