Advertisement
Guest User

CloCkWeRX

a guest
Oct 27th, 2008
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.66 KB | None | 0 0
  1. Index: tests/test_conditions.html.phpt
  2. ===================================================================
  3. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_conditions.html.phpt,v
  4. retrieving revision 1.1
  5. diff -u -r1.1 test_conditions.html.phpt
  6. --- tests/test_conditions.html.phpt 22 Jan 2005 05:25:19 -0000 1.1
  7. +++ tests/test_conditions.html.phpt 27 Oct 2008 07:30:08 -0000
  8. @@ -16,13 +16,13 @@
  9. <H2>Conditions</H2>
  10. <p>a condition <?php if ($t->condition) {?> hello <?php } else {?> world <?php }?></p>
  11. <p>a negative condition <?php if (!$t->condition) {?> hello <?php } else {?> world <?php }?></p>
  12. -<p>a conditional method <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'condition'))) if ($t->condition()) { ?> hello <?php } else {?> world <?php }?></p>
  13. -<p>a negative conditional method <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'condition'))) if (!$t->condition()) { ?> hello <?php } else {?> world <?php }?></p>
  14. +<p>a conditional method <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'condition'))) if ($t->condition()) { ?> hello <?php } else {?> world <?php }?></p>
  15. +<p>a negative conditional method <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'condition'))) if (!$t->condition()) { ?> hello <?php } else {?> world <?php }?></p>
  16.  
  17.  
  18. <?php if ($t->test) {?><span>test</span><?php }?>
  19. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'test'))) if ($t->test()) { ?><span>test</span><?php }?>
  20. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'test'))) if ($t->test("aaa bbb",$t->ccc,"asdfasdf asdf ")) { ?><span>test</span><?php }?>
  21. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'test'))) if ($t->test()) { ?><span>test</span><?php }?>
  22. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'test'))) if ($t->test("aaa bbb",$t->ccc,"asdfasdf asdf ")) { ?><span>test</span><?php }?>
  23.  
  24.  
  25.  
  26. @@ -72,4 +72,4 @@
  27.  
  28.  
  29.  
  30. -<H2>Notices and errros</H2>
  31. \ No newline at end of file
  32. +<H2>Notices and errros</H2>
  33. Index: tests/test_forms.html.phpt
  34. ===================================================================
  35. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_forms.html.phpt,v
  36. retrieving revision 1.8
  37. diff -u -r1.8 test_forms.html.phpt
  38. --- tests/test_forms.html.phpt 25 Nov 2005 06:28:48 -0000 1.8
  39. +++ tests/test_forms.html.phpt 27 Oct 2008 07:30:09 -0000
  40. @@ -76,16 +76,25 @@
  41. <?php echo $this->elements['aaa3']->toHtml();?>
  42.  
  43. <!-- bug 5267 -->
  44. - <?php $element = $this->elements['opt_1'];
  45. - $element = $this->mergeElement($element,$this->elements['opt[]']);
  46. + <?php
  47. + $element = $this->elements['opt_1'];
  48. + if (isset($this->elements['opt[]'])) {
  49. + $element = $this->mergeElement($element,$this->elements['opt[]']);
  50. + }
  51. echo $element->toHtml();?>
  52. <label for="opt_1">option 1</label>
  53. - <?php $element = $this->elements['opt_2'];
  54. - $element = $this->mergeElement($element,$this->elements['opt[]']);
  55. + <?php
  56. + $element = $this->elements['opt_2'];
  57. + if (isset($this->elements['opt[]'])) {
  58. + $element = $this->mergeElement($element,$this->elements['opt[]']);
  59. + }
  60. echo $element->toHtml();?>
  61. <label for="opt_3">option 2</label>
  62. - <?php $element = $this->elements['opt_3'];
  63. - $element = $this->mergeElement($element,$this->elements['opt[]']);
  64. + <?php
  65. + $element = $this->elements['opt_3'];
  66. + if (isset($this->elements['opt[]'])) {
  67. + $element = $this->mergeElement($element,$this->elements['opt[]']);
  68. + }
  69. echo $element->toHtml();?>
  70. <label for="opt_3">option 3</label>
  71.  
  72. @@ -100,21 +109,33 @@
  73.  
  74. #bug bug6058
  75.  
  76. - <br /><?php $element = $this->elements['1'];
  77. - $element = $this->mergeElement($element,$this->elements['payment_1_type']);
  78. + <br /><?php
  79. + $element = $this->elements['1'];
  80. + if (isset($this->elements['payment_1_type'])) {
  81. + $element = $this->mergeElement($element,$this->elements['payment_1_type']);
  82. + }
  83. echo $element->toHtml();?>
  84. Credit card
  85. - <br /><?php $element = $this->elements['2'];
  86. - $element = $this->mergeElement($element,$this->elements['payment_1_type']);
  87. + <br /><?php
  88. + $element = $this->elements['2'];
  89. + if (isset($this->elements['payment_1_type'])) {
  90. + $element = $this->mergeElement($element,$this->elements['payment_1_type']);
  91. + }
  92. echo $element->toHtml();?>
  93. Cheque
  94.  
  95. - <br /><?php $element = $this->elements['3'];
  96. - $element = $this->mergeElement($element,$this->elements['payment_2_type']);
  97. + <br /><?php
  98. + $element = $this->elements['3'];
  99. + if (isset($this->elements['payment_2_type'])) {
  100. + $element = $this->mergeElement($element,$this->elements['payment_2_type']);
  101. + }
  102. echo $element->toHtml();?>
  103. Credit card
  104. - <br /><?php $element = $this->elements['4'];
  105. - $element = $this->mergeElement($element,$this->elements['payment_2_type']);
  106. + <br /><?php
  107. + $element = $this->elements['4'];
  108. + if (isset($this->elements['payment_2_type'])) {
  109. + $element = $this->mergeElement($element,$this->elements['payment_2_type']);
  110. + }
  111. echo $element->toHtml();?>
  112. Cheque
  113.  
  114. @@ -186,7 +207,7 @@
  115. </form>
  116. Array
  117. (
  118. - [test] => html_template_flexy_element Object
  119. + [test] => HTML_Template_Flexy_Element Object
  120. (
  121. [tag] => form
  122. [attributes] => Array
  123. @@ -204,7 +225,7 @@
  124. [value] =>
  125. )
  126.  
  127. - [test123] => html_template_flexy_element Object
  128. + [test123] => HTML_Template_Flexy_Element Object
  129. (
  130. [tag] => input
  131. [attributes] => Array
  132. @@ -222,7 +243,7 @@
  133. [value] =>
  134. )
  135.  
  136. - [test123a] => html_template_flexy_element Object
  137. + [test123a] => HTML_Template_Flexy_Element Object
  138. (
  139. [tag] => input
  140. [attributes] => Array
  141. @@ -243,7 +264,7 @@
  142. [value] =>
  143. )
  144.  
  145. - [test123ab] => html_template_flexy_element Object
  146. + [test123ab] => HTML_Template_Flexy_Element Object
  147. (
  148. [tag] => input
  149. [attributes] => Array
  150. @@ -263,7 +284,7 @@
  151. [value] =>
  152. )
  153.  
  154. - [fred] => html_template_flexy_element Object
  155. + [fred] => HTML_Template_Flexy_Element Object
  156. (
  157. [tag] => textarea
  158. [attributes] => Array
  159. @@ -282,7 +303,7 @@
  160. [value] =>
  161. )
  162.  
  163. - [aaa1] => html_template_flexy_element Object
  164. + [aaa1] => HTML_Template_Flexy_Element Object
  165. (
  166. [tag] => select
  167. [attributes] => Array
  168. @@ -294,7 +315,7 @@
  169. (
  170. [0] =>
  171.  
  172. - [1] => html_template_flexy_element Object
  173. + [1] => HTML_Template_Flexy_Element Object
  174. (
  175. [tag] => option
  176. [attributes] => Array
  177. @@ -314,7 +335,7 @@
  178.  
  179. [2] =>
  180.  
  181. - [3] => html_template_flexy_element Object
  182. + [3] => HTML_Template_Flexy_Element Object
  183. (
  184. [tag] => option
  185. [attributes] => Array
  186. @@ -335,7 +356,7 @@
  187.  
  188. [4] =>
  189.  
  190. - [5] => html_template_flexy_element Object
  191. + [5] => HTML_Template_Flexy_Element Object
  192. (
  193. [tag] => option
  194. [attributes] => Array
  195. @@ -363,7 +384,7 @@
  196. [value] =>
  197. )
  198.  
  199. - [aaa3] => html_template_flexy_element Object
  200. + [aaa3] => HTML_Template_Flexy_Element Object
  201. (
  202. [tag] => select
  203. [attributes] => Array
  204. @@ -375,7 +396,7 @@
  205. (
  206. [0] =>
  207.  
  208. - [1] => html_template_flexy_element Object
  209. + [1] => HTML_Template_Flexy_Element Object
  210. (
  211. [tag] => option
  212. [attributes] => Array
  213. @@ -395,7 +416,7 @@
  214.  
  215. [2] =>
  216.  
  217. - [3] => html_template_flexy_element Object
  218. + [3] => HTML_Template_Flexy_Element Object
  219. (
  220. [tag] => option
  221. [attributes] => Array
  222. @@ -416,7 +437,7 @@
  223.  
  224. [4] =>
  225.  
  226. - [5] => html_template_flexy_element Object
  227. + [5] => HTML_Template_Flexy_Element Object
  228. (
  229. [tag] => option
  230. [attributes] => Array
  231. @@ -445,7 +466,7 @@
  232. [value] =>
  233. )
  234.  
  235. - [opt_1] => html_template_flexy_element Object
  236. + [opt_1] => HTML_Template_Flexy_Element Object
  237. (
  238. [tag] => input
  239. [attributes] => Array
  240. @@ -467,7 +488,7 @@
  241. [value] =>
  242. )
  243.  
  244. - [opt_2] => html_template_flexy_element Object
  245. + [opt_2] => HTML_Template_Flexy_Element Object
  246. (
  247. [tag] => input
  248. [attributes] => Array
  249. @@ -489,7 +510,7 @@
  250. [value] =>
  251. )
  252.  
  253. - [opt_3] => html_template_flexy_element Object
  254. + [opt_3] => HTML_Template_Flexy_Element Object
  255. (
  256. [tag] => input
  257. [attributes] => Array
  258. @@ -511,7 +532,7 @@
  259. [value] =>
  260. )
  261.  
  262. - [List] => html_template_flexy_element Object
  263. + [List] => HTML_Template_Flexy_Element Object
  264. (
  265. [tag] => select
  266. [attributes] => Array
  267. @@ -523,7 +544,7 @@
  268. (
  269. [0] =>
  270.  
  271. - [1] => html_template_flexy_element Object
  272. + [1] => HTML_Template_Flexy_Element Object
  273. (
  274. [tag] => option
  275. [attributes] => Array
  276. @@ -544,7 +565,7 @@
  277.  
  278. [2] =>
  279.  
  280. - [3] => html_template_flexy_element Object
  281. + [3] => HTML_Template_Flexy_Element Object
  282. (
  283. [tag] => option
  284. [attributes] => Array
  285. @@ -565,7 +586,7 @@
  286.  
  287. [4] =>
  288.  
  289. - [5] => html_template_flexy_element Object
  290. + [5] => HTML_Template_Flexy_Element Object
  291. (
  292. [tag] => option
  293. [attributes] => Array
  294. @@ -594,7 +615,7 @@
  295. [value] =>
  296. )
  297.  
  298. - [_submit[4]] => html_template_flexy_element Object
  299. + [_submit[4]] => HTML_Template_Flexy_Element Object
  300. (
  301. [tag] => input
  302. [attributes] => Array
  303. @@ -614,7 +635,7 @@
  304. [value] =>
  305. )
  306.  
  307. - [_submit[5]] => html_template_flexy_element Object
  308. + [_submit[5]] => HTML_Template_Flexy_Element Object
  309. (
  310. [tag] => input
  311. [attributes] => Array
  312. @@ -634,7 +655,7 @@
  313. [value] =>
  314. )
  315.  
  316. - [testupload] => html_template_flexy_element Object
  317. + [testupload] => HTML_Template_Flexy_Element Object
  318. (
  319. [tag] => input
  320. [attributes] => Array
  321. @@ -653,8 +674,25 @@
  322. [value] =>
  323. )
  324.  
  325. - [payment_1_type] =>
  326. - [1] => html_template_flexy_element Object
  327. + [payment_1_type] => HTML_Template_Flexy_Element Object
  328. + (
  329. + [tag] => input
  330. + [attributes] => Array
  331. + (
  332. + [type] => radio
  333. + )
  334. +
  335. + [children] => Array
  336. + (
  337. + )
  338. +
  339. + [override] =>
  340. + [prefix] =>
  341. + [suffix] =>
  342. + [value] =>
  343. + )
  344. +
  345. + [1] => HTML_Template_Flexy_Element Object
  346. (
  347. [tag] => input
  348. [attributes] => Array
  349. @@ -676,7 +714,7 @@
  350. [value] =>
  351. )
  352.  
  353. - [2] => html_template_flexy_element Object
  354. + [2] => HTML_Template_Flexy_Element Object
  355. (
  356. [tag] => input
  357. [attributes] => Array
  358. @@ -698,8 +736,25 @@
  359. [value] =>
  360. )
  361.  
  362. - [payment_2_type] =>
  363. - [3] => html_template_flexy_element Object
  364. + [payment_2_type] => HTML_Template_Flexy_Element Object
  365. + (
  366. + [tag] => input
  367. + [attributes] => Array
  368. + (
  369. + [type] => radio
  370. + )
  371. +
  372. + [children] => Array
  373. + (
  374. + )
  375. +
  376. + [override] =>
  377. + [prefix] =>
  378. + [suffix] =>
  379. + [value] =>
  380. + )
  381. +
  382. + [3] => HTML_Template_Flexy_Element Object
  383. (
  384. [tag] => input
  385. [attributes] => Array
  386. @@ -721,7 +776,7 @@
  387. [value] =>
  388. )
  389.  
  390. - [4] => html_template_flexy_element Object
  391. + [4] => HTML_Template_Flexy_Element Object
  392. (
  393. [tag] => input
  394. [attributes] => Array
  395. @@ -743,7 +798,7 @@
  396. [value] =>
  397. )
  398.  
  399. - [picture] => html_template_flexy_element Object
  400. + [picture] => HTML_Template_Flexy_Element Object
  401. (
  402. [tag] => img
  403. [attributes] => Array
  404. @@ -762,7 +817,7 @@
  405. [value] =>
  406. )
  407.  
  408. - [testing] => html_template_flexy_element Object
  409. + [testing] => HTML_Template_Flexy_Element Object
  410. (
  411. [tag] => input
  412. [attributes] => Array
  413. @@ -781,7 +836,7 @@
  414. [value] =>
  415. )
  416.  
  417. - [_submit[2]] => html_template_flexy_element Object
  418. + [_submit[2]] => HTML_Template_Flexy_Element Object
  419. (
  420. [tag] => input
  421. [attributes] => Array
  422. @@ -801,7 +856,7 @@
  423. [value] =>
  424. )
  425.  
  426. - [testing2] => html_template_flexy_element Object
  427. + [testing2] => HTML_Template_Flexy_Element Object
  428. (
  429. [tag] => input
  430. [attributes] => Array
  431. @@ -819,7 +874,7 @@
  432. [value] =>
  433. )
  434.  
  435. - [_submit[1]] => html_template_flexy_element Object
  436. + [_submit[1]] => HTML_Template_Flexy_Element Object
  437. (
  438. [tag] => input
  439. [attributes] => Array
  440. @@ -838,7 +893,7 @@
  441. [value] =>
  442. )
  443.  
  444. - [testingxhtml] => html_template_flexy_element Object
  445. + [testingxhtml] => HTML_Template_Flexy_Element Object
  446. (
  447. [tag] => input
  448. [attributes] => Array
  449. @@ -859,7 +914,7 @@
  450. [value] =>
  451. )
  452.  
  453. - [xhtmllisttest] => html_template_flexy_element Object
  454. + [xhtmllisttest] => HTML_Template_Flexy_Element Object
  455. (
  456. [tag] => select
  457. [attributes] => Array
  458. @@ -881,7 +936,7 @@
  459. [value] =>
  460. )
  461.  
  462. - [testingcheckbox] => html_template_flexy_element Object
  463. + [testingcheckbox] => HTML_Template_Flexy_Element Object
  464. (
  465. [tag] => input
  466. [attributes] => Array
  467. @@ -901,7 +956,7 @@
  468. [value] =>
  469. )
  470.  
  471. - [test_mix] => html_template_flexy_element Object
  472. + [test_mix] => HTML_Template_Flexy_Element Object
  473. (
  474. [tag] => form
  475. [attributes] => Array
  476. @@ -919,7 +974,7 @@
  477. [value] =>
  478. )
  479.  
  480. - [testing5] => html_template_flexy_element Object
  481. + [testing5] => HTML_Template_Flexy_Element Object
  482. (
  483. [tag] => input
  484. [attributes] => Array
  485. @@ -937,7 +992,7 @@
  486. [value] =>
  487. )
  488.  
  489. - [_submit[3]] => html_template_flexy_element Object
  490. + [_submit[3]] => HTML_Template_Flexy_Element Object
  491. (
  492. [tag] => input
  493. [attributes] => Array
  494. @@ -1037,4 +1092,4 @@
  495.  
  496.  
  497.  
  498. -<form name="test_mix" action=""><input name="testing5" value=""><input type="submit" name="_submit[3]"></form>
  499. \ No newline at end of file
  500. +<form name="test_mix" action=""><input name="testing5" value=""><input type="submit" name="_submit[3]"></form>
  501. Index: tests/test_looping.html.phpt
  502. ===================================================================
  503. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_looping.html.phpt,v
  504. retrieving revision 1.2
  505. diff -u -r1.2 test_looping.html.phpt
  506. --- tests/test_looping.html.phpt 25 Jan 2005 06:11:56 -0000 1.2
  507. +++ tests/test_looping.html.phpt 27 Oct 2008 07:30:09 -0000
  508. @@ -24,7 +24,7 @@
  509.  
  510. Bug #84
  511. <?php if ($this->options['strict'] || (is_array($t->list) || is_object($t->list))) foreach($t->list as $i) {?>
  512. - <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'method'))) echo htmlspecialchars($t->method($i));?>
  513. + <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'method'))) echo htmlspecialchars($t->method($i));?>
  514. <?php }?>
  515.  
  516. <?php if ($this->options['strict'] || (is_array($t->list) || is_object($t->list))) foreach($t->list as $i => $j) {?>
  517. @@ -33,7 +33,7 @@
  518.  
  519. <table>
  520. <?php if ($this->options['strict'] || (is_array($t->xyz) || is_object($t->xyz))) foreach($t->xyz as $abcd => $def) {?><tr>
  521. - <td><?php echo htmlspecialchars($abcd);?>, <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'test'))) echo htmlspecialchars($t->test($def));?></td>
  522. + <td><?php echo htmlspecialchars($abcd);?>, <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'test'))) echo htmlspecialchars($t->test($def));?></td>
  523. </tr><?php }?>
  524. </table>
  525.  
  526. @@ -106,4 +106,4 @@
  527. 1:2
  528. 2:3
  529. 3:4
  530. -]]>
  531. \ No newline at end of file
  532. +]]>
  533. Index: tests/test_methods.html.phpt
  534. ===================================================================
  535. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_methods.html.phpt,v
  536. retrieving revision 1.1
  537. diff -u -r1.1 test_methods.html.phpt
  538. --- tests/test_methods.html.phpt 22 Jan 2005 05:25:19 -0000 1.1
  539. +++ tests/test_methods.html.phpt 27 Oct 2008 07:30:09 -0000
  540. @@ -13,72 +13,72 @@
  541. ===Compiled file: methods.html===
  542.  
  543. <h2>Methods</H2>
  544. -<p>Calling a method <?php if ($this->options['strict'] || (isset($t->a) && method_exists($t->a,'helloWorld'))) echo htmlspecialchars($t->a->helloWorld());?></p>
  545. -<p>or <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'includeBody'))) echo $t->includeBody();?></P>
  546. -<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getImageDir'))) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg">
  547. -<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getImageDir'))) echo $t->getImageDir();?>/someimage.jpg">
  548. -<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getImageDir'))) echo urlencode($t->getImageDir());?>/someimage.jpg">
  549. +<p>Calling a method <?php if ($this->options['strict'] || (isset($t->a) && method_exists($t->a, 'helloWorld'))) echo htmlspecialchars($t->a->helloWorld());?></p>
  550. +<p>or <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'includeBody'))) echo $t->includeBody();?></P>
  551. +<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getImageDir'))) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg">
  552. +<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getImageDir'))) echo $this->plugin("h%7",$t->getImageDir());?>/someimage.jpg">
  553. +<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getImageDir'))) echo $this->plugin("u%7",$t->getImageDir());?>/someimage.jpg">
  554.  
  555. -<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getImageDir'))) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg">
  556. -<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getImageDir'))) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg">
  557. +<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getImageDir'))) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg">
  558. +<img src="<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getImageDir'))) echo htmlspecialchars($t->getImageDir());?>/someimage.jpg">
  559.  
  560.  
  561.  
  562. -<span class="<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getBgnd'))) echo htmlspecialchars($t->getBgnd($t->valueArr['isConfigurable']));?>"></span>
  563. +<span class="<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getBgnd'))) echo htmlspecialchars($t->getBgnd($t->valueArr['isConfigurable']));?>"></span>
  564.  
  565.  
  566.  
  567. <h2>Full Method testing</h2>
  568.  
  569. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo htmlspecialchars($t->abc($t->abc,$t->def,$t->hij));?>
  570. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo htmlspecialchars($t->abc($t->abc,"def","hij"));?>
  571. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo htmlspecialchars($t->abc($t->abc,$t->def,$t->hij));?>
  572. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo htmlspecialchars($t->abc($t->abc,"def","hij"));?>
  573.  
  574. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo htmlspecialchars($t->abc($t->abc,$t->def,"hij"));?>
  575. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo htmlspecialchars($t->abc("abc",$t->def,$t->hij));?>
  576. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo htmlspecialchars($t->abc($t->abc,$t->def,"hij"));?>
  577. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo htmlspecialchars($t->abc("abc",$t->def,$t->hij));?>
  578.  
  579. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo $t->abc($t->abc,$t->def,$t->hij);?>
  580. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo $t->abc($t->abc,"def","hij");?>
  581. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo $t->abc($t->abc,$t->def,"hij");?>
  582. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo $t->abc("abc",$t->def,$t->hij);?>
  583. -
  584. -
  585. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo urlencode($t->abc($t->abc,$t->def,$t->hij));?>
  586. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo urlencode($t->abc($t->abc,"def","hij"));?>
  587. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo urlencode($t->abc($t->abc,$t->def,"hij"));?>
  588. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo urlencode($t->abc("abc",$t->def,$t->hij));?>
  589. -
  590. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo htmlspecialchars($t->abc(123,$t->def,$t->hij));?>
  591. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo urlencode($t->abc($t->abc,123,123));?>
  592. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo htmlspecialchars($t->abc($t->abc,$t->def,123));?>
  593. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'abc'))) echo urlencode($t->abc("abc",123,$t->hij));?>
  594. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo $t->abc($t->abc,$t->def,$t->hij);?>
  595. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo $t->abc($t->abc,"def","hij");?>
  596. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo $t->abc($t->abc,$t->def,"hij");?>
  597. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo $t->abc("abc",$t->def,$t->hij);?>
  598. +
  599. +
  600. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo urlencode($t->abc($t->abc,$t->def,$t->hij));?>
  601. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo urlencode($t->abc($t->abc,"def","hij"));?>
  602. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo urlencode($t->abc($t->abc,$t->def,"hij"));?>
  603. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo urlencode($t->abc("abc",$t->def,$t->hij));?>
  604. +
  605. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo htmlspecialchars($t->abc(123,$t->def,$t->hij));?>
  606. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo urlencode($t->abc($t->abc,123,123));?>
  607. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo htmlspecialchars($t->abc($t->abc,$t->def,123));?>
  608. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'abc'))) echo urlencode($t->abc("abc",123,$t->hij));?>
  609.  
  610.  
  611. <h2>Real life method testing </h2>
  612. -Invoice number: <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"number"));?> Place:
  613. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"place"));?> Date: <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"date"));?> Payment:
  614. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"payment"));?> Payment date:
  615. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"payment_date"));?> Seller: Name 1:
  616. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"name1"));?> Name 2: <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"name2"));?> NIP:
  617. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"nip"));?> Street: <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"street"));?> City:
  618. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"code"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"city"));?> Buyer: Name 1:
  619. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"name1"));?> Name 2: <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"name2"));?> NIP:
  620. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"nip"));?> Street: <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"street"));?> City:
  621. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"code"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"city"));?>
  622. +Invoice number: <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"number"));?> Place:
  623. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"place"));?> Date: <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"date"));?> Payment:
  624. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"payment"));?> Payment date:
  625. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->invoice,"payment_date"));?> Seller: Name 1:
  626. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"name1"));?> Name 2: <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"name2"));?> NIP:
  627. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"nip"));?> Street: <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"street"));?> City:
  628. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"code"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->seller,"city"));?> Buyer: Name 1:
  629. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"name1"));?> Name 2: <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"name2"));?> NIP:
  630. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"nip"));?> Street: <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"street"));?> City:
  631. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"code"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($t->buyer,"city"));?>
  632. # Name <?php if ($t->show_pkwiu) {?> PKWIU<?php }?> Count Netto VAT Brutto
  633. -<?php if ($this->options['strict'] || (is_array($t->positions) || is_object($t->positions))) foreach($t->positions as $position) {?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"nr"));?>
  634. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"name"));?> <?php if ($t->show_pkwiu) {?>
  635. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"pkwiu"));?><?php }?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"count"));?>
  636. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"netto"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"vat"));?>
  637. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"brutto"));?>
  638. +<?php if ($this->options['strict'] || (is_array($t->positions) || is_object($t->positions))) foreach($t->positions as $position) {?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"nr"));?>
  639. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"name"));?> <?php if ($t->show_pkwiu) {?>
  640. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"pkwiu"));?><?php }?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"count"));?>
  641. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"netto"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"vat"));?>
  642. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"brutto"));?>
  643. <?php }?> <?php if ($t->edit_positions) {?> # Name <?php if ($t->show_pkwiu) {?> PKWIU<?php }?> Count
  644. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) if ($t->getelem($t->position,"netto_mode")) { ?> Netto<?php } else {?> <?php }?> VAT
  645. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) if ($t->getelem($t->position,"netto_mode")) { ?> <?php } else {?> Brutto<?php }?>
  646. -<?php if ($this->options['strict'] || (is_array($t->edit_positions) || is_object($t->edit_positions))) foreach($t->edit_positions as $k => $position) {?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($position,"nr"));?>
  647. -<?php if ($t->show_pkwiu) {?> <?php }?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) if ($t->getelem($position,"netto_mode")) { ?> <?php } else {?>
  648. -<?php }?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) if ($t->getelem($position,"netto_mode")) { ?> <?php } else {?> <?php }?>
  649. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) if ($t->getelem($t->position,"netto_mode")) { ?> Netto<?php } else {?> <?php }?> VAT
  650. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) if ($t->getelem($t->position,"netto_mode")) { ?> <?php } else {?> Brutto<?php }?>
  651. +<?php if ($this->options['strict'] || (is_array($t->edit_positions) || is_object($t->edit_positions))) foreach($t->edit_positions as $k => $position) {?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($position,"nr"));?>
  652. +<?php if ($t->show_pkwiu) {?> <?php }?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) if ($t->getelem($position,"netto_mode")) { ?> <?php } else {?>
  653. +<?php }?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) if ($t->getelem($position,"netto_mode")) { ?> <?php } else {?> <?php }?>
  654. <?php }?> <?php }?> #
  655. -<?php if ($this->options['strict'] || (is_array($t->sum) || is_object($t->sum))) foreach($t->sum as $sum) {?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($sum,"nr"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($sum,"netto"));?>
  656. -<?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($sum,"vat"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t,'getelem'))) echo htmlspecialchars($t->getelem($sum,"brutto"));?>
  657. +<?php if ($this->options['strict'] || (is_array($t->sum) || is_object($t->sum))) foreach($t->sum as $sum) {?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($sum,"nr"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($sum,"netto"));?>
  658. +<?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($sum,"vat"));?> <?php if ($this->options['strict'] || (isset($t) && method_exists($t, 'getelem'))) echo htmlspecialchars($t->getelem($sum,"brutto"));?>
  659. <?php }?>
  660.  
  661.  
  662. @@ -120,4 +120,4 @@
  663. Name 2: NIP:
  664. Street: City:
  665. # Name Count Netto VAT Brutto
  666. - #
  667. \ No newline at end of file
  668. + #
  669. Index: tests/test_namespaces.html.phpt
  670. ===================================================================
  671. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_namespaces.html.phpt,v
  672. retrieving revision 1.1
  673. diff -u -r1.1 test_namespaces.html.phpt
  674. --- tests/test_namespaces.html.phpt 22 Jan 2005 05:25:19 -0000 1.1
  675. +++ tests/test_namespaces.html.phpt 27 Oct 2008 07:30:09 -0000
  676. @@ -101,11 +101,7 @@
  677. </html:select>
  678.  
  679. <!-- test toElement -->
  680. - <menulist id="supplier_id">
  681. - <menupopup>
  682. - <menuitem id="itemSubCatAll" label="-- Select --" value="0" />
  683. - </menupopup>
  684. - </menulist>
  685. + <menulist id="supplier_id"><menupopup><menuitem id="itemSubCatAll" label="-- Select --" value="0" /></menupopup></menulist>
  686. <!-- test using flexy stuff -->
  687. <menulist id="supplier_id2">
  688. <menupopup>
  689. @@ -113,9 +109,5 @@
  690. </menulist>
  691.  
  692. <!-- test args on menupopup -->
  693. - <menulist id="product_category">
  694. - <menupopup onpopuphiding="cTree.categorySelect(this.parentNode.value,1);">
  695. - <menuitem id="prodCatAll" label="-- All --" value="0" />
  696. - </menupopup>
  697. - </menulist>
  698. -</window>
  699. \ No newline at end of file
  700. + <menulist id="product_category"><menupopup onpopuphiding="cTree.categorySelect(this.parentNode.value,1);"><menuitem id="prodCatAll" label="-- All --" value="0" /></menupopup></menulist>
  701. +</window>
  702. Index: tests/test_plugin_modifiers.html.phpt
  703. ===================================================================
  704. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_plugin_modifiers.html.phpt,v
  705. retrieving revision 1.3
  706. diff -u -r1.3 test_plugin_modifiers.html.phpt
  707. --- tests/test_plugin_modifiers.html.phpt 14 May 2005 04:18:18 -0000 1.3
  708. +++ tests/test_plugin_modifiers.html.phpt 27 Oct 2008 07:30:09 -0000
  709. @@ -32,7 +32,7 @@
  710.  
  711. Bug #3946 - inside raw!
  712.  
  713. -<input type="checkbox" name="useTextarea3" <?php if ($this->options['strict'] || (isset($t->person) && method_exists($t->person,'useTextarea'))) echo $this->plugin("checked",$t->person->useTextarea());?>>
  714. +<input type="checkbox" name="useTextarea3" <?php if ($this->options['strict'] || (isset($t->person) && method_exists($t->person, 'useTextarea'))) echo $this->plugin("checked",$t->person->useTextarea());?>>
  715.  
  716.  
  717.  
  718. @@ -51,4 +51,4 @@
  719.  
  720. ===Compiling flexy_raw_with_element.html===
  721.  
  722. -Error:/var/svn_live/pear/HTML_Template_Flexy/tests/templates/flexy_raw_with_element.html on Line 5 in Tag &lt;INPUT&gt;:<BR>Flexy:raw can only be used with flexy:ignore, to prevent conversion of html elements to flexy elements
  723. \ No newline at end of file
  724. +Error:/home/clockwerx/pear/HTML_Template_Flexy/tests/templates/flexy_raw_with_element.html on Line 5 in Tag &lt;INPUT&gt;:<BR>Flexy:raw can only be used with flexy:ignore, to prevent conversion of html elements to flexy elements
  725. Index: tests/test_usesname.html.phpt
  726. ===================================================================
  727. RCS file: /repository/pear/HTML_Template_Flexy/tests/test_usesname.html.phpt,v
  728. retrieving revision 1.1
  729. diff -u -r1.1 test_usesname.html.phpt
  730. --- tests/test_usesname.html.phpt 29 Jun 2005 03:19:20 -0000 1.1
  731. +++ tests/test_usesname.html.phpt 27 Oct 2008 07:30:09 -0000
  732. @@ -35,9 +35,16 @@
  733. <body>
  734. <?php echo $this->elements['formtest']->toHtmlnoClose();?>
  735. <?php if ($this->options['strict'] || (is_array($t->data) || is_object($t->data))) foreach($t->data as $key => $row) {?>
  736. - <?php echo htmlspecialchars($key);?>: <?php if (!isset($this->elements[sprintf('data%s',$key)])) $this->elements[sprintf('data%s',$key)]= $this->elements['data%s'];
  737. - $this->elements[sprintf('data%s',$key)] = $this->mergeElement($this->elements['data%s'],$this->elements[sprintf('data%s',$key)]);
  738. + <?php echo htmlspecialchars($key);?>: <?php
  739. + if (!isset($this->elements[sprintf('data%s',$key)])) {
  740. + $this->elements[sprintf('data%s',$key)]= $this->elements['data%s'];
  741. + }
  742. + $this->elements[sprintf('data%s',$key)] = $this->mergeElement(
  743. + $this->elements['data%s'],
  744. + $this->elements[sprintf('data%s',$key)]
  745. + );
  746. $this->elements[sprintf('data%s',$key)]->attributes['name'] = sprintf('data%s',$key);
  747. +
  748. echo $this->elements[sprintf('data%s',$key)]->toHtml();?><br>
  749. <?php }?>
  750. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement