Completed
Push — master ( a5b5d2...58e670 )
by
unknown
02:33
created
assets/snippets/DocLister/lib/DLpaginateReversed.class.php 1 patch
Braces   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -3,15 +3,15 @@  discard block
 block discarded – undo
3 3
 /**
4 4
  * Class DLpaginate
5 5
  */
6
-class DLpaginateReversed extends DLpaginate
7
-{
6
+class DLpaginateReversed extends DLpaginate
7
+{
8 8
     /**
9 9
      * @param $page
10 10
      * @return int|mixed
11 11
      */
12
-    protected function getPageQuery($page)
13
-    {
14
-        switch ($this->mode) {
12
+    protected function getPageQuery($page)
13
+    {
14
+        switch ($this->mode) {
15 15
             case 'offset':
16 16
                 $display = isset($this->modeConfig['display']) ? $this->modeConfig['display'] : 0;
17 17
                 $out = $display * ($this->total_pages - $page);
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      * @param $num
32 32
      * @return mixed
33 33
      */
34
-    protected function renderItemTPL($tpl, $num)
35
-    {
34
+    protected function renderItemTPL($tpl, $num)
35
+    {
36 36
         $_num = $this->total_pages + 1 - $num;
37 37
         return str_replace(array('[+num+]', '[+link+]'), array($_num, $this->get_pagenum_link($_num)), $tpl);
38 38
     }
@@ -41,15 +41,15 @@  discard block
 block discarded – undo
41 41
      * @param $id
42 42
      * @return mixed|string
43 43
      */
44
-    public function get_pagenum_link($id)
45
-    {
44
+    public function get_pagenum_link($id)
45
+    {
46 46
         $flag = (strpos($this->target, '?') === false);
47 47
         $value = $this->getPageQuery($id);
48
-        if ($flag && !empty($this->urlF)) {
48
+        if ($flag && !empty($this->urlF)) {
49 49
             $out = str_replace($this->urlF, $value, $this->target);
50
-        } else {
50
+        } else {
51 51
             $out = $this->target;
52
-            if ($id > 0 && $id < $this->total_pages) {
52
+            if ($id > 0 && $id < $this->total_pages) {
53 53
                 $out .= ($flag ? "?" : "&") . $this->parameterName . "=" . $value;
54 54
             }
55 55
         }
Please login to merge, or discard this patch.