diff --git a/web/lang/en/pkgfuncs_po.inc b/web/lang/en/pkgfuncs_po.inc
index 2f6a62e8..3e7d318a 100644
--- a/web/lang/en/pkgfuncs_po.inc
+++ b/web/lang/en/pkgfuncs_po.inc
@@ -159,4 +159,6 @@ $_t["en"]["This package has been flagged out of date."] = "This package has been
$_t["en"]["Toggle Notify"] = "Toggle Notify";
+$_t["en"]["Showing results %s - %s of %s"] = "Showing results %s - %s of %s";
+
?>
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index a6086f80..713eb6b2 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -712,24 +712,24 @@ function pkg_search_page($SID="") {
print "\n";
print "
\n";
- print " ".__("Search by");
- print " \n";
-
- print " \n";
- print " | \n";
+ print " \n";
+ print "\n";
print "\n";
print " ".__("Per page");
@@ -754,17 +754,6 @@ function pkg_search_page($SID="") {
print " value='".__("Go")."'>\n";
print " | \n";
- /*
- * Commented the My Packages button because there is no need for it
- * cause we already have a link.
- *
- if ($SID) {
- print " \n";
- print " \n";
- print " | \n";
- }*/
-
print " \n";
print " \n";
@@ -884,7 +873,9 @@ function pkg_search_page($SID="") {
$q.= "ORDER BY Name ".$order.", LocationID ASC, CategoryID DESC ";
break;
}
-
+
+ $allresults = mysql_num_rows(db_query($q, $dbh));
+
$qnext = $q."LIMIT ".($O+$PP).", ".$PP; //next page's worth
$q.= "LIMIT ".$O.", ".$PP;
@@ -1116,6 +1107,21 @@ function pkg_search_page($SID="") {
print " \n";
print " \n";
+ # figure out the results to use
+ $first = $O + 1;
+
+ if (($PP+$O) > $allresults) {
+ $last = $allresults;
+ } else {
+ $last = $PP + $O;
+ }
+
+ # print number of results
+ # ok this styling sucks
+ print " ";
+ print __("Showing results %s - %s of %s", array($first, $last, $allresults));
+ print " | ";
+
# first print the legend
print " ";
print " \n";
| |