[BUGFIX] Fix active page calculation in indexed_search 06/33606/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 29 Oct 2014 12:21:56 +0000 (13:21 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 29 Oct 2014 12:53:41 +0000 (13:53 +0100)
Because of introducing a strict comparion in #60346, the active page is
not highlighted anymore as a float and an int value are compared.

Change-Id: Id66c77e64fb4824f5b254240b1774f77adfa6ab9
Resolves: #62532
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/33606
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php

index 6000419..635cbfc 100644 (file)
@@ -1609,7 +1609,7 @@ class SearchFormController extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
                                // all pages after the 1st one
                                $links[] = '<li>' . $this->makePointerSelector_link($this->pi_getLL('pi_list_browseresults_prev', '< Previous', TRUE), $pointer - 1, $freeIndexUid) . '</li>';
                        }
-                       $minPage = $pointer - floor($maxPages / 2);
+                       $minPage = $pointer - (int)floor($maxPages / 2);
                        $maxPage = $minPage + $maxPages - 1;
                        // Check if the indexes are within the page limits
                        if ($minPage < 0) {