summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--web/lib/pkgfuncs.inc.php5
-rw-r--r--web/template/pkg_search_results.php7
2 files changed, 8 insertions, 4 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 2265c767..979d74b5 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -602,6 +602,11 @@ function pkg_search_page($SID="", $dbh=NULL) {
}
include('pkg_search_form.php');
+
+ while ($row = mysql_fetch_assoc($result)) {
+ $searchresults[] = $row;
+ }
+
include('pkg_search_results.php');
return;
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 95590f77..d676c0a3 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -46,9 +46,8 @@ if (!$result): ?>
</thead>
<tbody>
-
- <?php for ($i = 0; $row = mysql_fetch_assoc($result); $i++): ?>
- <tr class="<?php echo ($i % 2 == 0) ? 'odd' : 'even' ?>">
+ <?php while (list($indx, $row) = each($searchresults)): ?>
+ <tr class="<?php echo ($indx % 2 == 0) ? 'odd' : 'even' ?>">
<?php if ($SID): ?>
<td><input type="checkbox" name="IDs[<?php echo $row["ID"] ?>]" value="1" /></td>
<?php endif; ?>
@@ -76,7 +75,7 @@ if (!$result): ?>
<?php endif; ?>
</td>
</tr>
- <?php endfor; ?>
+ <?php endwhile; ?>
</tbody>
</table>