@@ -97,19 +97,19 @@  | 
                                                    ||
| 97 | 97 | $this->DocLister->toPlaceholders($to, 1, "to");  | 
                                                        
| 98 | 98 | $this->DocLister->toPlaceholders($this->renderPages($paginate), 1, "pages");  | 
                                                        
| 99 | 99 | |
| 100 | -		if($pages > 1) {
 | 
                                                        |
| 101 | -			if($this->currentPage() == 1) {
 | 
                                                        |
| 102 | - $next = 2;  | 
                                                        |
| 103 | -			} elseif($pages == $this->currentPage()) {
 | 
                                                        |
| 104 | - $prev = $this->currentPage() - 1;  | 
                                                        |
| 105 | -			} else {
 | 
                                                        |
| 106 | - $prev = $this->currentPage() - 1;  | 
                                                        |
| 107 | - $next = $this->currentPage() + 1;  | 
                                                        |
| 108 | - }  | 
                                                        |
| 100 | +        if($pages > 1) {
 | 
                                                        |
| 101 | +            if($this->currentPage() == 1) {
 | 
                                                        |
| 102 | + $next = 2;  | 
                                                        |
| 103 | +            } elseif($pages == $this->currentPage()) {
 | 
                                                        |
| 104 | + $prev = $this->currentPage() - 1;  | 
                                                        |
| 105 | +            } else {
 | 
                                                        |
| 106 | + $prev = $this->currentPage() - 1;  | 
                                                        |
| 107 | + $next = $this->currentPage() + 1;  | 
                                                        |
| 108 | + }  | 
                                                        |
| 109 | 109 | |
| 110 | -			if(isset($prev)) $this->modx->regClientStartupHTMLBlock('<link rel="prev" href="' .$this->getUrl(). '?page=' .$prev. '">');
 | 
                                                        |
| 111 | -			if(isset($next)) $this->modx->regClientStartupHTMLBlock('<link rel="next" href="' .$this->getUrl(). '?page=' .$next. '">');
 | 
                                                        |
| 112 | - }  | 
                                                        |
| 110 | +            if(isset($prev)) $this->modx->regClientStartupHTMLBlock('<link rel="prev" href="' .$this->getUrl(). '?page=' .$prev. '">');
 | 
                                                        |
| 111 | +            if(isset($next)) $this->modx->regClientStartupHTMLBlock('<link rel="next" href="' .$this->getUrl(). '?page=' .$next. '">');
 | 
                                                        |
| 112 | + }  | 
                                                        |
| 113 | 113 | |
| 114 | 114 | $this->DocLister->toPlaceholders(($this->currentPage() == 1 ? 1 : 0), 1,  | 
                                                        
| 115 | 115 | "isstart"); //[+isstart+] – is start page  | 
                                                        
@@ -56,9 +56,9 @@ discard block  | 
                                                    ||
| 56 | 56 |                  $requestName = $this->getRequestName('page');
 | 
                                                        
| 57 | 57 | if (  | 
                                                        
| 58 | 58 | isset($_GET[$requestName])  | 
                                                        
| 59 | -                    && !$this->DocLister->getCFGDef('noRedirect', 0)
 | 
                                                        |
| 59 | +                    && ! $this->DocLister->getCFGDef('noRedirect', 0)
 | 
                                                        |
| 60 | 60 |                  ) {
 | 
                                                        
| 61 | -                    if ((!$this->reverse && (intval($_GET[$requestName]) <= 1 || intval($_GET[$requestName]) > $pages)) || ($this->reverse && (intval($_GET[$requestName]) >= $pages || intval($_GET[$requestName]) < 1))) {
 | 
                                                        |
| 61 | +                    if (( ! $this->reverse && (intval($_GET[$requestName]) <= 1 || intval($_GET[$requestName]) > $pages)) || ($this->reverse && (intval($_GET[$requestName]) >= $pages || intval($_GET[$requestName]) < 1))) {
 | 
                                                        |
| 62 | 62 | $this->modx->sendRedirect($this->getUrl());  | 
                                                        
| 63 | 63 | }  | 
                                                        
| 64 | 64 | }  | 
                                                        
@@ -97,18 +97,18 @@ discard block  | 
                                                    ||
| 97 | 97 | $this->DocLister->toPlaceholders($to, 1, "to");  | 
                                                        
| 98 | 98 | $this->DocLister->toPlaceholders($this->renderPages($paginate), 1, "pages");  | 
                                                        
| 99 | 99 | |
| 100 | -		if($pages > 1) {
 | 
                                                        |
| 101 | -			if($this->currentPage() == 1) {
 | 
                                                        |
| 100 | +		if ($pages > 1) {
 | 
                                                        |
| 101 | +			if ($this->currentPage() == 1) {
 | 
                                                        |
| 102 | 102 | $next = 2;  | 
                                                        
| 103 | -			} elseif($pages == $this->currentPage()) {
 | 
                                                        |
| 103 | +			} elseif ($pages == $this->currentPage()) {
 | 
                                                        |
| 104 | 104 | $prev = $this->currentPage() - 1;  | 
                                                        
| 105 | 105 |  			} else {
 | 
                                                        
| 106 | 106 | $prev = $this->currentPage() - 1;  | 
                                                        
| 107 | 107 | $next = $this->currentPage() + 1;  | 
                                                        
| 108 | 108 | }  | 
                                                        
| 109 | 109 | |
| 110 | -			if(isset($prev)) $this->modx->regClientStartupHTMLBlock('<link rel="prev" href="' .$this->getUrl(). '?page=' .$prev. '">');
 | 
                                                        |
| 111 | -			if(isset($next)) $this->modx->regClientStartupHTMLBlock('<link rel="next" href="' .$this->getUrl(). '?page=' .$next. '">');
 | 
                                                        |
| 110 | +			if (isset($prev)) $this->modx->regClientStartupHTMLBlock('<link rel="prev" href="' . $this->getUrl() . '?page=' . $prev . '">');
 | 
                                                        |
| 111 | +			if (isset($next)) $this->modx->regClientStartupHTMLBlock('<link rel="next" href="' . $this->getUrl() . '?page=' . $next . '">');
 | 
                                                        |
| 112 | 112 | }  | 
                                                        
| 113 | 113 | |
| 114 | 114 | $this->DocLister->toPlaceholders(($this->currentPage() == 1 ? 1 : 0), 1,  | 
                                                        
@@ -117,7 +117,7 @@ discard block  | 
                                                    ||
| 117 | 117 | "isstop"); //[+isstop+] – is end page  | 
                                                        
| 118 | 118 | $this->DocLister->toPlaceholders($pages, 1, "totalPages"); // [+totalPages+] - total page.  | 
                                                        
| 119 | 119 |          $limit = $this->DocLister->getCFGDef('maxDocs', 0);
 | 
                                                        
| 120 | -        if ($limit > 0 && !$this->reverse) {
 | 
                                                        |
| 120 | +        if ($limit > 0 && ! $this->reverse) {
 | 
                                                        |
| 121 | 121 |              switch ($paginate) {
 | 
                                                        
| 122 | 122 | case 'offset':  | 
                                                        
| 123 | 123 | $offset = $start;  | 
                                                        
@@ -291,7 +291,7 @@ discard block  | 
                                                    ||
| 291 | 291 | $q = http_build_query(array_merge($params, array($this->getRequestName($requestName) => null)));  | 
                                                        
| 292 | 292 |              $url = explode("?", $url, 2);
 | 
                                                        
| 293 | 293 | $url = $url[0];  | 
                                                        
| 294 | -            if (!empty($q)) {
 | 
                                                        |
| 294 | +            if ( ! empty($q)) {
 | 
                                                        |
| 295 | 295 | $url .= "?" . $q;  | 
                                                        
| 296 | 296 | }  | 
                                                        
| 297 | 297 | }  | 
                                                        
@@ -107,8 +107,12 @@  | 
                                                    ||
| 107 | 107 | $next = $this->currentPage() + 1;  | 
                                                        
| 108 | 108 | }  | 
                                                        
| 109 | 109 | |
| 110 | -			if(isset($prev)) $this->modx->regClientStartupHTMLBlock('<link rel="prev" href="' .$this->getUrl(). '?page=' .$prev. '">');
 | 
                                                        |
| 111 | -			if(isset($next)) $this->modx->regClientStartupHTMLBlock('<link rel="next" href="' .$this->getUrl(). '?page=' .$next. '">');
 | 
                                                        |
| 110 | +			if(isset($prev)) {
 | 
                                                        |
| 111 | +			    $this->modx->regClientStartupHTMLBlock('<link rel="prev" href="' .$this->getUrl(). '?page=' .$prev. '">');
 | 
                                                        |
| 112 | + }  | 
                                                        |
| 113 | +			if(isset($next)) {
 | 
                                                        |
| 114 | +			    $this->modx->regClientStartupHTMLBlock('<link rel="next" href="' .$this->getUrl(). '?page=' .$next. '">');
 | 
                                                        |
| 115 | + }  | 
                                                        |
| 112 | 116 | }  | 
                                                        
| 113 | 117 | |
| 114 | 118 | $this->DocLister->toPlaceholders(($this->currentPage() == 1 ? 1 : 0), 1,  |