.../Domain/Repository/IndexSearchRepository.php | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php index f37bc53..3bf2534 100644 --- a/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php +++ b/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php @@ -67,6 +67,9 @@ class Tx_IndexedSearch_Domain_Repository_IndexSearchRepository { // formally known as $this->piVars['pointer'] protected $resultpagePointer = 0; + // display this amount of search results per page + protected $resultsPerPage = 0; + // formally known as $this->piVars['result'] protected $numberOfResults = 10; @@ -134,6 +137,7 @@ class Tx_IndexedSearch_Domain_Repository_IndexSearchRepository { $this->sortOrder = $searchData['sortOrder']; $this->descendingSortOrderFlag = $searchData['desc']; $this->resultpagePointer = $searchData['pointer']; + $this->resultsPerPage = intval($searchData['results']); if (isset($searchData['numberOfResults']) && is_numeric($searchData['numberOfResults'])) { $this->numberOfResults = intval($searchData['numberOfResults']); @@ -168,7 +172,10 @@ class Tx_IndexedSearch_Domain_Repository_IndexSearchRepository { $count = $GLOBALS['TYPO3_DB']->sql_num_rows($res); // The pointer is set to the result page that is currently being viewed - $pointer = t3lib_div::intInRange($this->resultpagePointer, 0, floor($count / $this->resultsPerPage)); + $pointer = 0; + if ($this->resultsPerPage) { + $pointer = t3lib_utility_Math::forceIntegerInRange($this->resultpagePointer, 0, floor($count / $this->resultsPerPage)); + } // Initialize result accumulation variables: $c = 0; // Result pointer: Counts up the position in the current search-result