Completed
Push — master ( 209908...d5c329 )
by Adam
01:51
created
src/Pagination.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
      */
19 19
     public static function paging($records, $pageURL, $start = 0, $additional = '', $maxshown = 50, $numpagesshown = 11) {
20 20
         if ($records > $maxshown) {
21
-            if ($start >= 1) { self::$current = $start; } else { self::$current = 1; }
21
+            if ($start >= 1) { self::$current = $start; }else { self::$current = 1; }
22 22
             self::$lastpage = ceil($records / $maxshown);
23 23
             
24 24
             if (!empty($additional)) { $additional = 'search='.$additional.'&'; }
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 $paging .= '<li><a href="'.$pageURL.'?'.$additional.'page='.($start - 1).'">&lt;</a></li>';
31 31
             }
32 32
             while (self::$page <= self::$lastpage) {
33
-                if (self::$current == self::$page) { $curselect = ' class="active"'; } else { $curselect = ''; }
33
+                if (self::$current == self::$page) { $curselect = ' class="active"'; }else { $curselect = ''; }
34 34
                 $paging .= '<li'.$curselect.'><a href="'.$pageURL.'?'.$additional.'page='.self::$page.'">'.self::$page.'</a></li>';
35 35
                 self::$page = (self::$page + 1);
36 36
             }
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
     protected static function getPage($records, $maxshown, $numpages) {
55 55
         $show = floor($numpages / 2);
56 56
         if (self::$lastpage > $numpages) {
57
-            if (self::$current > $show) { self::$page = self::$current - $show; } else { self::$page = 1; }
57
+            if (self::$current > $show) { self::$page = self::$current - $show; }else { self::$page = 1; }
58 58
 
59 59
             if (self::$current < (self::$lastpage - $show)) {
60 60
                 self::$lastpage = self::$current + $show;
61 61
                 if (self::$current <= $show) { self::$lastpage = self::$current + ($numpages - self::$current); }
62
-            } else { self::$page = self::$current - ($numpages - ((ceil($records / $maxshown) - self::$current)) - 1); }
63
-        } else { self::$page = 1; }
62
+            }else { self::$page = self::$current - ($numpages - ((ceil($records / $maxshown) - self::$current)) - 1); }
63
+        }else { self::$page = 1; }
64 64
     }
65 65
 }
Please login to merge, or discard this patch.