Limit pages to something sensible
authormoodler <moodler>
Tue, 19 Aug 2003 04:37:32 +0000 (04:37 +0000)
committermoodler <moodler>
Tue, 19 Aug 2003 04:37:32 +0000 (04:37 +0000)
lib/weblib.php

index e81979e565e84a3d20c33b964309da8ddea92476..b2acc194c81f8c5ce1d38ea7b3f82f2a5228c638 100644 (file)
@@ -1628,8 +1628,12 @@ function print_paging_bar($totalcount, $page, $perpage, $baseurl) {
             } else {
                 echo "&nbsp;&nbsp;<a href=\"{$baseurl}page=$count\">$displaypage</a>";
             }
-            $count++;
             $totalcount -= $perpage;
+            $count++;
+            if ($count > 30) {
+                echo "&nbsp;...";
+                break;
+            }
         }
         $pagenum = $page + 1;
         if ($pagenum != $count) {