From 8df9c5387845646b435f665d5af8c27495d4800b Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sun, 4 Dec 2011 15:11:38 +0000 Subject: [PATCH] + fix the implementation of the arrows in the search restult page --- src/common/kiwix/searcher.cpp | 2 +- static/results.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/kiwix/searcher.cpp b/src/common/kiwix/searcher.cpp index 26ab55e0c..50b3860c9 100644 --- a/src/common/kiwix/searcher.cpp +++ b/src/common/kiwix/searcher.cpp @@ -215,7 +215,7 @@ namespace kiwix { oData["resultStart"] = this->resultStart + 1; oData["resultEnd"] = (this->resultEnd > this->estimatedResultCount ? this->estimatedResultCount : this->resultEnd); oData["resultRange"] = this->resultRange; - oData["resultLastPageStart"] = this->estimatedResultCount - this->resultRange; + oData["resultLastPageStart"] = this->estimatedResultCount > this->resultRange ? this->estimatedResultCount - this->resultRange : 0; oData["protocolPrefix"] = this->protocolPrefix; oData["searchProtocolPrefix"] = this->searchProtocolPrefix; diff --git a/static/results.tmpl b/static/results.tmpl index a6711f80e..ee002301e 100644 --- a/static/results.tmpl +++ b/static/results.tmpl @@ -114,13 +114,13 @@