diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index cae0eb49..c098b286 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -124,34 +124,40 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) {
+ 0) {
+ $pages = ceil($total / $_GET['PP']);
+ }
+
+ if ($pages > 1) {
+ ?>
+
-
- = 0): ?>
-
- 0): ?>
-
-
- |
-
- 0) { $pages = ceil($total/$_GET['PP']); } ?>
- 0) { $currentpage = ceil(($_GET['O']+1)/$_GET['PP']); }
- else { $currentpage = 1; } ?>
- $currentpage) :
- $pagestart = ($i-1)*$_GET['PP']; ?>
-
-
- |
-
- 0): ?>
- '>
-
+ |
+ 0) {
+ $currentpage = ceil(($_GET['O'] + 1) / $_GET['PP']);
+ }
+ else {
+ $currentpage = 1;
+ }
+
+ for ($i = 1; $i <= $pages; $i++) {
+ if ($i <> $currentpage) :
+ $pagestart = ($i - 1) * $_GET['PP'];
+ ?>
+
+
|
-
+