[BUGFIX] Repository uses wrong property to calc current result page 77/26677/3
authorBenjamin Rau <rau@codearts.at>
Tue, 7 Jan 2014 17:07:34 +0000 (18:07 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 7 Jan 2014 17:59:07 +0000 (18:59 +0100)
In the IndexedSearchRepository on line 157 an undefined/unused
property $this->resultsPerPage is used for the calculation
of the current page the visitor is showing on search results.

Instead of using $this->resultsPerPage we have to use
$this->numberOfResults which is defined and contains the expected setting.

Change-Id: I37c3a08c1049eb6166704b2b98ba071f03aad243
Resolves: #54808
Releases: 6.2, 6.1
Reviewed-on: https://review.typo3.org/26677
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php

index d518195..0db8ec0 100644 (file)
@@ -154,7 +154,7 @@ class IndexSearchRepository {
                        // Total search-result count
                        $count = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                        // The pointer is set to the result page that is currently being viewed
-                       $pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->resultpagePointer, 0, floor($count / $this->resultsPerPage));
+                       $pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->resultpagePointer, 0, floor($count / $this->numberOfResults));
                        // Initialize result accumulation variables:
                        $c = 0;
                        // Result pointer: Counts up the position in the current search-result