diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 5688b0ba..71b6a636 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -15,6 +15,7 @@
|
+
'>
|
@@ -27,6 +28,7 @@
'>
|
+
|
|
@@ -50,19 +52,19 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
|
|
|
- |
+ |
- |
+
-
+
- |
+
-
+
@@ -109,7 +111,8 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
|
-
+ |
+
@@ -119,9 +122,6 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
}
if ($pages > 1) {
- ?>
-
- 0) {
$currentpage = ceil(($_GET['O'] + 1) / $_GET['PP']);
}
@@ -129,12 +129,10 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
$currentpage = 1;
}
- if ($currentpage + 5 < $pages) {
- $pages = $currentpage + 5;
- }
+ $morepages = $currentpage + 5;
# Display links for more search results.
- for ($i = ($currentpage - 5); $i <= ($pages); $i++) {
+ for ($i = ($currentpage - 5); $i <= $morepages && $i <= $pages; $i++) {
if ($i < 1) {
$i = 1;
}
@@ -144,28 +142,31 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
if ($i <> $currentpage) :
?>
- [$i] ";
endif;
}
- ?>
- 0):
- $O = $_GET['O'] - $_GET['PP'];
-
- if ($_GET['O'] < $_GET['PP']) {
- $O = 0;
+ # Indicate that there are more pages.
+ if ($pages > $morepages) {
+ echo "... ';
}
+
+ if ($_GET['O'] > 0):
+ $O = $_GET['O'] - $_GET['PP'];
+
+ if ($_GET['O'] < $_GET['PP']) {
+ $O = 0;
+ }
?>
">
-
+
0): ?>
'>
- |
-
+
+