Skip to content

Commit

Permalink
[BUGFIX] Fix regression which required a startingpoint to be always s…
Browse files Browse the repository at this point in the history
…et, see #257
  • Loading branch information
christianbltr committed Nov 15, 2024
1 parent 8bf56bd commit e8eb8dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
ChangeLog

Upcoming version
[BUGFIX] Fix regression which required a startingpoint to be always set. https://github.com/tpwd/ke_search/issues/257

Version 6.1.1, 25 October 2024
[BUGFIX] Fix regression in composer.json which removes TYPO3 13 requirement

Expand Down
5 changes: 5 additions & 0 deletions Classes/Lib/Db.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,11 @@ public function getWhere()
$where .= $this->createQueryForDateRange();

// restrict to storage page
if (empty($this->pObj->startingPoints)) {
throw new \Exception('No starting point found. Please set the starting point in the plugin'
. ' configuration or via TypoScript: '
. 'https://docs.typo3.org/p/tpwd/ke_search/main/en-us/Configuration/OverrideRecordStoragePage.html.');
}
$startingPoints = $this->pObj->pi_getPidList($this->pObj->startingPoints);
$where .= ' AND pid in (' . $startingPoints . ') ';

Expand Down
6 changes: 0 additions & 6 deletions Classes/Lib/PluginBaseHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ public function getStartingPoint(): string
$startingpoint['recursive'] = $this->pObj->conf['overrideStartingPointRecursive'] ?? 0;
}

if (empty($startingpoint['pages'])) {
throw new \Exception('No starting point found. Please set the starting point in the plugin'
. ' configuration or via TypoScript: '
. 'https://docs.typo3.org/p/tpwd/ke_search/main/en-us/Configuration/OverrideRecordStoragePage.html.');
}

return $this->pObj->pi_getPidList($startingpoint['pages'], $startingpoint['recursive']);
}

Expand Down

0 comments on commit e8eb8dd

Please sign in to comment.