Actions
Bug #59957
closedDuplicate code respectively not used variable in sysext\backend\Classes\Search\LiveSearch\LiveSearch.php
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Code Cleanup
Target version:
-
Start date:
2014-06-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
no-brainer
Is Regression:
No
Sprint Focus:
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.
Actions