Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for page navigation: show only as much pages as are available for given navigation constraints, not as given by total results size

Michael Peter Christen73f5a9e8b3b1
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index 0e71bacf3..9b93d5536 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -93,7 +93,7 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
resnav += ("\"><img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" /></a>&nbsp;");
}
- numberofpages = Math.min(10, 1 + ((totalcount - 1) / itemsperpage));
+ numberofpages = Math.min(10, 1 + ((itemscount - 1) / itemsperpage));
if (!numberofpages) numberofpages = 10;
for (i = 0; i < numberofpages; i++) {
if (i == thispage) {