From 9de93a170ca9e78391f6366c93380f7c26ede5ae Mon Sep 17 00:00:00 2001
From: Benjamin Rau <rau@codearts.at>
Date: Tue, 7 Jan 2014 18:07:34 +0100
Subject: [PATCH] [BUGFIX] Repository uses wrong property to calc current
 result page

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
---
 .../Classes/Domain/Repository/IndexSearchRepository.php         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
index d51819504971..0db8ec0e3d95 100644
--- a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
+++ b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
@@ -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
-- 
GitLab