Bug #21026 » 0011917_v2.diff
t3lib/tceforms/class.t3lib_tceforms_suggest_defaultreceiver.php (Arbeitskopie) | ||
---|---|---|
$likeCondition = ' LIKE \'' . ($searchWholePhrase ? '%' : '') .
|
||
$GLOBALS['TYPO3_DB']->escapeStrForLike($searchString, $this->table).'%\'';
|
||
$selectFields = array();
|
||
if (isset($GLOBALS['TCA'][$this->table]['ctrl']['label_alt'])) {
|
||
// Search in all fields given by label or label_alt
|
||
$selectFields = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$this->table]['ctrl']['label_alt']);
|
||
}
|
||
$selectFields[] = $GLOBALS['TCA'][$this->table]['ctrl']['label'];
|
||
// Search in all fields given by label or label_alt
|
||
$selectFieldsList = $GLOBALS['TCA'][$this->table]['ctrl']['label'] . ',' . $GLOBALS['TCA'][$this->table]['ctrl']['label_alt'];
|
||
$selectFields = t3lib_div::trimExplode(',', $selectFieldsList, TRUE);
|
||
$selectParts = array();
|
||
foreach ($selectFields as $field) {
|
||
$selectParts[] = $field . $likeCondition;
|
||
}
|
||
$this->selectClause = implode(' OR ', $selectParts);
|
||
$this->selectClause = '(' . implode(' OR ', $selectParts) . ')';
|
||
if ($searchUid > 0 && $searchUid == $searchString) {
|
||
$this->selectClause = '(' . $this->selectClause . ' OR uid = ' . $searchUid . ')';
|
- « Previous
- 1
- 2
- Next »