@@ -24,7 +24,7 @@ |
||
24 | 24 | { |
25 | 25 | $flag = (strpos($this->target, '?') === false); |
26 | 26 | $value = $this->getPageQuery($id); |
27 | - if ($flag && !empty($this->urlF)) { |
|
27 | + if ($flag && ! empty($this->urlF)) { |
|
28 | 28 | $out = str_replace($this->urlF, $value, $this->target); |
29 | 29 | } else { |
30 | 30 | $out = $this->target; |
@@ -3,15 +3,15 @@ discard block |
||
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 $tpl |
10 | 10 | * @param $num |
11 | 11 | * @return mixed |
12 | 12 | */ |
13 | - protected function renderItemTPL($tpl, $num) |
|
14 | - { |
|
13 | + protected function renderItemTPL($tpl, $num) |
|
14 | + { |
|
15 | 15 | $_num = $this->total_pages + 1 - $num; |
16 | 16 | return str_replace(array('[+num+]', '[+link+]'), array($_num, $this->get_pagenum_link($_num)), $tpl); |
17 | 17 | } |
@@ -20,15 +20,15 @@ discard block |
||
20 | 20 | * @param $id |
21 | 21 | * @return mixed|string |
22 | 22 | */ |
23 | - public function get_pagenum_link($id) |
|
24 | - { |
|
23 | + public function get_pagenum_link($id) |
|
24 | + { |
|
25 | 25 | $flag = (strpos($this->target, '?') === false); |
26 | 26 | $value = $this->getPageQuery($id); |
27 | - if ($flag && !empty($this->urlF)) { |
|
27 | + if ($flag && !empty($this->urlF)) { |
|
28 | 28 | $out = str_replace($this->urlF, $value, $this->target); |
29 | - } else { |
|
29 | + } else { |
|
30 | 30 | $out = $this->target; |
31 | - if ($id > 0 && $id < $this->total_pages) { |
|
31 | + if ($id > 0 && $id < $this->total_pages) { |
|
32 | 32 | $out .= ($flag ? "?" : "&") . $this->parameterName . "=" . $value; |
33 | 33 | } |
34 | 34 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('MODX_BASE_PATH')) { |
|
2 | +if ( ! defined('MODX_BASE_PATH')) { |
|
3 | 3 | die('HACK???'); |
4 | 4 | } |
5 | 5 | |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | $requestName = $this->getRequestName('page'); |
56 | 56 | if ( |
57 | 57 | isset($_GET[$requestName]) |
58 | - && !$this->DocLister->getCFGDef('noRedirect', 0) |
|
58 | + && ! $this->DocLister->getCFGDef('noRedirect', 0) |
|
59 | 59 | ) { |
60 | - if ((!$this->reverse && (intval($_GET[$requestName]) <= 1 || intval($_GET[$requestName]) > $pages)) || ($this->reverse && (intval($_GET[$requestName]) >= $pages || intval($_GET[$requestName]) <1))) { |
|
60 | + if (( ! $this->reverse && (intval($_GET[$requestName]) <= 1 || intval($_GET[$requestName]) > $pages)) || ($this->reverse && (intval($_GET[$requestName]) >= $pages || intval($_GET[$requestName]) < 1))) { |
|
61 | 61 | $this->modx->sendRedirect($this->getUrl()); |
62 | 62 | } |
63 | 63 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $q = http_build_query(array_merge($params, array($this->getRequestName($requestName) => null))); |
243 | 243 | $url = explode("?", $url, 2); |
244 | 244 | $url = $url[0]; |
245 | - if (!empty($q)) { |
|
245 | + if ( ! empty($q)) { |
|
246 | 246 | $url .= "?" . $q; |
247 | 247 | } |
248 | 248 | } |