@@ -85,19 +85,19 @@ require('./header.inc.phtml');
8585 ?> </textarea>
8686 </section>
8787 <section>
88- <label for="usedby">Used by:</label>
88+ <label for="usedby">Used by:</label>
8989 <table><?php
90- $ all_products = Product::getAllProducts ();
91- $ used_by = $ this ->getContext ()->used_by ;
92- $ j = count ($ all_products );
93- for ($ i = 0 ; $ i < $ j ; ++$ i ) { ?>
94- <tr><td><input type="checkbox" name="used_by[]" value="<?php
95- echo $ all_products [$ i ]->getBnetProductId () . "\"" . ($ used_by !== null && in_array ($ all_products [$ i ], $ used_by ) ? " checked> " : "> " ) . filter_var ($ all_products [$ i ]->getLabel (), FILTER_SANITIZE_STRING ) . "</td><td> " ;
96- if ($ i + 1 < $ j ) {
97- ++$ i ;
98- ?> <input type="checkbox" name="used_by[]" value="<?php
99- echo $ all_products [$ i ]->getBnetProductId () . "\"" . ($ used_by !== null && in_array ($ all_products [$ i ], $ used_by ) ? " checked> " : "> " ) . filter_var ($ all_products [$ i ]->getLabel (), FILTER_SANITIZE_STRING ); ?> </td></tr>
100- <?php }
90+ $ all_products = Product::getAllProducts ();
91+ $ used_by = $ this ->getContext ()->used_by ;
92+ $ j = count ($ all_products );
93+ for ($ i = 0 ; $ i < $ j ; ++$ i ) { ?>
94+ <tr><td><input type="checkbox" name="used_by[]" value="<?php
95+ echo $ all_products [$ i ]->getBnetProductId () . "\"" . ($ used_by !== null && in_array ($ all_products [$ i ], $ used_by ) ? " checked> " : "> " ) . filter_var ($ all_products [$ i ]->getLabel (), FILTER_SANITIZE_STRING ) . "</td><td> " ;
96+ if ($ i + 1 < $ j ) {
97+ ++$ i ;
98+ ?> <input type="checkbox" name="used_by[]" value="<?php
99+ echo $ all_products [$ i ]->getBnetProductId () . "\"" . ($ used_by !== null && in_array ($ all_products [$ i ], $ used_by ) ? " checked> " : "> " ) . filter_var ($ all_products [$ i ]->getLabel (), FILTER_SANITIZE_STRING ); ?> </td></tr>
100+ <?php }
101101 } ?>
102102 </table>
103103 </section>
0 commit comments