"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/View/Helper/PaginatorHelper.php" between
cakephp-4.0.1.tar.gz and cakephp-4.0.2.tar.gz

About: CakePHP is a rapid development framework for PHP applications. Source code.

PaginatorHelper.php  (cakephp-4.0.1):PaginatorHelper.php  (cakephp-4.0.2)
skipping to change at line 277 skipping to change at line 277
if ($dir === 'desc') { if ($dir === 'desc') {
return 'desc'; return 'desc';
} }
return 'asc'; return 'asc';
} }
/** /**
* Generate an active/inactive link for next/prev methods. * Generate an active/inactive link for next/prev methods.
* *
* @param string|bool $text The enabled text for the link. * @param string|false $text The enabled text for the link.
* @param bool $enabled Whether or not the enabled/disabled version should b e created. * @param bool $enabled Whether or not the enabled/disabled version should b e created.
* @param array $options An array of options from the calling method. * @param array $options An array of options from the calling method.
* @param array $templates An array of templates with the 'active' and 'disa bled' keys. * @param array $templates An array of templates with the 'active' and 'disa bled' keys.
* @return string Generated HTML * @return string Generated HTML
*/ */
protected function _toggledLink($text, $enabled, $options, $templates): stri ng protected function _toggledLink($text, $enabled, $options, $templates): stri ng
{ {
$template = $templates['active']; $template = $templates['active'];
if (!$enabled) { if (!$enabled) {
$text = $options['disabledTitle']; $text = $options['disabledTitle'];
skipping to change at line 1075 skipping to change at line 1075
if (is_int($first) && $params['page'] >= $first) { if (is_int($first) && $params['page'] >= $first) {
for ($i = 1; $i <= $first; $i++) { for ($i = 1; $i <= $first; $i++) {
$out .= $this->templater()->format('number', [ $out .= $this->templater()->format('number', [
'url' => $this->generateUrl(['page' => $i], $options['model' ], $options['url']), 'url' => $this->generateUrl(['page' => $i], $options['model' ], $options['url']),
'text' => $this->Number->format($i), 'text' => $this->Number->format($i),
]); ]);
} }
} elseif ($params['page'] > 1 && is_string($first)) { } elseif ($params['page'] > 1 && is_string($first)) {
$first = $options['escape'] ? h($first) : $first; $first = $options['escape'] ? h($first) : $first;
$out .= $this->templater()->format('first', [ $out .= $this->templater()->format('first', [
'url' => $this->generateUrl(['page' => 1], $options['model']), 'url' => $this->generateUrl(['page' => 1], $options['model'], $o ptions['url']),
'text' => $first, 'text' => $first,
]); ]);
} }
return $out; return $out;
} }
/** /**
* Returns a last or set of numbers for the last pages. * Returns a last or set of numbers for the last pages.
* *
skipping to change at line 1135 skipping to change at line 1135
if (is_int($last) && $params['page'] <= $lower) { if (is_int($last) && $params['page'] <= $lower) {
for ($i = $lower; $i <= $params['pageCount']; $i++) { for ($i = $lower; $i <= $params['pageCount']; $i++) {
$out .= $this->templater()->format('number', [ $out .= $this->templater()->format('number', [
'url' => $this->generateUrl(['page' => $i], $options['model' ], $options['url']), 'url' => $this->generateUrl(['page' => $i], $options['model' ], $options['url']),
'text' => $this->Number->format($i), 'text' => $this->Number->format($i),
]); ]);
} }
} elseif ($params['page'] < $params['pageCount'] && is_string($last)) { } elseif ($params['page'] < $params['pageCount'] && is_string($last)) {
$last = $options['escape'] ? h($last) : $last; $last = $options['escape'] ? h($last) : $last;
$out .= $this->templater()->format('last', [ $out .= $this->templater()->format('last', [
'url' => $this->generateUrl(['page' => $params['pageCount']], $o ptions['model']), 'url' => $this->generateUrl(['page' => $params['pageCount']], $o ptions['model'], $options['url']),
'text' => $last, 'text' => $last,
]); ]);
} }
return $out; return $out;
} }
/** /**
* Returns the meta-links for a paginated result set. * Returns the meta-links for a paginated result set.
* *
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)