Skip to content

Commit

Permalink
[BUGFIX] Show time-restricted records in top search
Browse files Browse the repository at this point in the history
The search in the top bar is now able to find records that are restricted
by starttime or endtime.

Resolves: #84507
Releases: master, 8.7
Change-Id: I3010a34d0bad082cf46dddd6d855b8d8406d8a6f
Reviewed-on: https://review.typo3.org/56401
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
andreaskienast authored and georgringer committed Mar 22, 2018
1 parent 3289ee0 commit 3c3f724
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -20,7 +20,9 @@
use TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression;
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
use TYPO3\CMS\Core\Database\Query\QueryHelper;
use TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
use TYPO3\CMS\Core\Database\Query\Restriction\StartTimeRestriction;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Type\Bitmask\Permission;
Expand Down Expand Up @@ -184,7 +186,10 @@ protected function findByTable($tableName, $pageIdList, $firstResult, $maxResult
if (!empty($fieldsToSearchWithin)) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable($tableName);
$queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
$queryBuilder->getRestrictions()
->removeByType(HiddenRestriction::class)
->removeByType(StartTimeRestriction::class)
->removeByType(EndTimeRestriction::class);

$queryBuilder
->select('*')
Expand Down

0 comments on commit 3c3f724

Please sign in to comment.