mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-09 21:12:41 +00:00
do not display page:1 or ?page=1 to avoid duplicate content in paginator helper output
This commit is contained in:
parent
532b2099e5
commit
05415dd83f
2 changed files with 80 additions and 67 deletions
|
@ -427,7 +427,12 @@ class PaginatorHelper extends AppHelper {
|
|||
$url = array_merge($url, compact('sort', 'direction'));
|
||||
}
|
||||
$url = $this->_convertUrlKeys($url, $paging['paramType']);
|
||||
|
||||
if (!empty($url['page']) && $url['page'] == 1) {
|
||||
unset($url['page']);
|
||||
}
|
||||
if (!empty($url['?']['page']) && $url['?']['page'] == 1) {
|
||||
unset($url['?']['page']);
|
||||
}
|
||||
if ($asArray) {
|
||||
return $url;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue