cvs: pear /HTML_Template_Flexy/tests/results1 looping.html.en.php
| From: | Alan Knowles | Date: | Sat, 01 May 2004 03:27:44 +0000 |
| Subject: | cvs: pear /HTML_Template_Flexy/tests/results1 looping.html.en.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-19060@lists.php.net to get a copy of this message | ||
alan_k Fri Apr 30 23:27:44 2004 EDT
Modified files:
/pear/HTML_Template_Flexy/tests/results1 looping.html.en.php
Log:
fix for bug #1274
http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/tests/results1/looping.html.en.php?r1=1.1&r2=1.2&ty=u
Index: pear/HTML_Template_Flexy/tests/results1/looping.html.en.php
diff -u pear/HTML_Template_Flexy/tests/results1/looping.html.en.php:1.1
pear/HTML_Template_Flexy/tests/results1/looping.html.en.php:1.2
--- pear/HTML_Template_Flexy/tests/results1/looping.html.en.php:1.1 Fri Apr 23 22:18:06 2004
+++ pear/HTML_Template_Flexy/tests/results1/looping.html.en.php Fri Apr 30 23:27:44 2004
@@ -3,31 +3,31 @@
<h2>Looping</h2>
-<p>a loop <?php if (is_array($t->loop) || is_object($t->loop)) foreach($t->loop
as $a) {?> <?php echo htmlspecialchars($a);?> <?php }?></p>
-<p>a loop with 2 vars <?php if (is_array($t->loop) || is_object($t->loop))
foreach($t->loop as $a => $b) {?>
+<p>a loop <?php if ($this->options['strict'] || (is_array($t->loop) ||
is_object($t->loop))) foreach($t->loop as $a) {?> <?php echo htmlspecialchars($a);?>
<?php }?></p>
+<p>a loop with 2 vars <?php if ($this->options['strict'] ||
(is_array($t->loop) || is_object($t->loop))) foreach($t->loop as $a => $b) {?>
<?php echo htmlspecialchars($a);?> ,
<?php echo htmlspecialchars($b);?>
<?php }?></p>
Bug #84
-<?php if (is_array($t->list) || is_object($t->list)) foreach($t->list as $i) {?>
- <?php if (isset($t) && method_exists($t,'method')) echo
htmlspecialchars($t->method($i));?>
+<?php if ($this->options['strict'] || (is_array($t->list) ||
is_object($t->list))) foreach($t->list as $i) {?>
+ <?php if ($this->options['strict'] || (isset($t) &&
method_exists($t,'method'))) echo htmlspecialchars($t->method($i));?>
<?php }?>
-<?php if (is_array($t->list) || is_object($t->list)) foreach($t->list as $i => $j)
{?>
+<?php if ($this->options['strict'] || (is_array($t->list) ||
is_object($t->list))) foreach($t->list as $i => $j) {?>
<?php echo htmlspecialchars($i);?>:<?php echo htmlspecialchars($j);?>
<?php }?>
<table>
- <?php if (is_array($t->xyz) || is_object($t->xyz)) foreach($t->xyz as $abcd =>
$def) {?><tr>
- <td><?php echo htmlspecialchars($abcd);?>, <?php if (isset($t) &&
method_exists($t,'test')) echo htmlspecialchars($t->test($def));?></td>
+ <?php if ($this->options['strict'] || (is_array($t->xyz) ||
is_object($t->xyz))) foreach($t->xyz as $abcd => $def) {?><tr>
+ <td><?php echo htmlspecialchars($abcd);?>, <?php if
($this->options['strict'] || (isset($t) && method_exists($t,'test')))
echo htmlspecialchars($t->test($def));?></td>
</tr><?php }?>
</table>
<h2>HTML tags example using foreach="loop,a,b" or the tr</h2>
<table width="100%" border="0">
- <?php if (is_array($t->loop) || is_object($t->loop)) foreach($t->loop as $a =>
$b) {?><tr>
+ <?php if ($this->options['strict'] || (is_array($t->loop) ||
is_object($t->loop))) foreach($t->loop as $a => $b) {?><tr>
<td><?php echo htmlspecialchars($a);?></td>
<td><?php echo htmlspecialchars($b);?></td>
</tr><?php }?>
@@ -35,7 +35,7 @@
<h2>HTML tags example using foreach="loop,a" or the tr using a highlight
class.</h2>
<table width="100%" border="0">
- <?php if (is_array($t->loop) || is_object($t->loop)) foreach($t->loop as $a)
{?><tr class="<?php echo htmlspecialchars($a->hightlight);?>">
+ <?php if ($this->options['strict'] || (is_array($t->loop) ||
is_object($t->loop))) foreach($t->loop as $a) {?><tr class="<?php echo
htmlspecialchars($a->hightlight);?>">
<td>a is</td>
<?php if ($a->showtext) {?><td><?php echo
htmlspecialchars($a->text);?></td><?php }?>
<?php if (!$a->showtext) {?><td><?php echo
number_format($a->price,2,'.',',');?></td><?php }?>