Bug #59957
closedDuplicate code respectively not used variable in sysext\backend\Classes\Search\LiveSearch\LiveSearch.php
100%
Description
In the function findByTable($tableName, $pageIdList, $limit) (line 190 in version 6.2.3) the variable $orderBy in line 196 is not used. Instead the function call $this->makeOrderByTable($tableName) is repeated in the next line.
$orderBy = $this->makeOrderByTable($tableName); $getRecordArray = $this->getRecordArray($tableName, $where, $this->makeOrderByTable($tableName), $limit)
protected function findByTable($tableName, $pageIdList, $limit) { $fieldsToSearchWithin = $this->extractSearchableFieldsFromTable($tableName); $getRecordArray = array(); if (count($fieldsToSearchWithin) > 0) { $pageBasedPermission = $tableName == 'pages' && $this->userPermissions ? $this->userPermissions : '1=1 '; $where = 'pid IN (' . $pageIdList . ') AND ' . $pageBasedPermission . $this->makeQuerySearchByTable($tableName, $fieldsToSearchWithin); $orderBy = $this->makeOrderByTable($tableName); $getRecordArray = $this->getRecordArray($tableName, $where, $this->makeOrderByTable($tableName), $limit); } return $getRecordArray; }
Solution: remove line 196 or use varible $orderBy in line 197.
Updated by Markus Klein about 10 years ago
Just pushed a patch today, that removes this line.
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31197
Updated by Gerrit Code Review about 10 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31247
Updated by Markus Klein about 10 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7a354dd769696034b237c5e4565bb313280a8903.
Updated by Gerrit Code Review about 10 years ago
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/31247
Updated by Markus Klein about 10 years ago
- Status changed from Under Review to Resolved
Applied in changeset a03309172057517ff7a07074ffe2cc40f620f27a.