[geeklog-hg] geeklog: Fixed algorithm error in the COM_printPageNavigation fu...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Sep 22 13:32:34 EDT 2012


changeset 8827:e2c37a381a90
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/e2c37a381a90
user: dengen
date: Sun Sep 23 02:31:30 2012 +0900
description:
Fixed algorithm error in the COM_printPageNavigation function

diffstat:

 public_html/lib-common.php |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r ee78e844f08e -r e2c37a381a90 public_html/lib-common.php
--- a/public_html/lib-common.php	Sat Sep 22 10:34:21 2012 -0400
+++ b/public_html/lib-common.php	Sun Sep 23 02:31:30 2012 +0900
@@ -5523,8 +5523,9 @@
     if ($page_end > $num_pages) {
         $odd = $page_end - $num_pages;
         $page_end = $num_pages;
-        if ($page_start - $odd >= 1) {
-            $page_start = $page_start - $odd;
+        $page_start = $page_start - $odd;
+        if ($page_start < 1) {
+            $page_start = 1;
         }
     }
     for ($pgcount = $page_start; $pgcount <= $page_end; $pgcount++) {



More information about the geeklog-cvs mailing list