Permalink
Browse files

Precount for performance

  • Loading branch information...
1 parent 7e7ef98 commit a3ee5e96dd179782297e83715d2dbc23c1134a07 unknown committed Aug 14, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 catalog/includes/modules/product_listing.php
@@ -35,7 +35,8 @@
' <table border="0" width="100%" cellspacing="0" cellpadding="2" class="productListingHeader">' .
' <tr>';
- for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
+ $n=sizeof($column_list);
+ for ($col=0; $col<$n; $col++) {
$lc_align = '';
switch ($column_list[$col]) {
@@ -95,8 +96,8 @@
$rows++;
$prod_list_contents .= ' <tr>';
-
- for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
+ $n=sizeof($column_list);
+ for ($col=0; $col<$n; $col++) {
switch ($column_list[$col]) {
case 'PRODUCT_LIST_MODEL':
$prod_list_contents .= ' <td>' . $listing['products_model'] . '</td>';

0 comments on commit a3ee5e9

Please sign in to comment.