Actions
Bug #46718
closedDescription Length
Start date:
2013-03-14
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The Search Result Description is really short. So I found the bug in the code. In SearchController around Line 580:
/** * Returns the resume for the search-result. * * @param array $row Search result row * @param boolean $noMarkup If noMarkup is FALSE, then the index_fulltext table is used to select the content of the page, split it with regex to display the search words in the text. * @param integer $length String length * @return string HTML string * @todo overwork this */ protected function makeDescription($row, $noMarkup = FALSE, *$length = 180*) { if ($row['show_resume']) { if (!$noMarkup) { $markedSW = ''; $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'index_fulltext', 'phash=' . intval($row['phash'])); if ($ftdrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // Cut HTTP references after some length $content = preg_replace('/(http:\\/\\/[^ ]{60})([^ ]+)/i', '$1...', $ftdrow['fulltextdata']); $markedSW = $this->markupSWpartsOfString($content); } $GLOBALS['TYPO3_DB']->sql_free_result($res); } if (!trim($markedSW)) { $outputStr = $GLOBALS['TSFE']->csConvObj->crop('utf-8', $row['item_description'], $length); $outputStr = htmlspecialchars($outputStr); } $output = $outputStr ? $outputStr : $markedSW; $output = $GLOBALS['TSFE']->csConv($output, 'utf-8'); } else { $output = '<span class="noResume">' . \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.noResume', 'indexed_search') . '</span>'; } return $output; }
The variable name should be $length not $lgd.
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19387
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19388
Updated by Georg Ringer over 11 years ago
- Status changed from New to Resolved
- % Done changed from 10 to 100
Updated by Oliver Hader over 11 years ago
- Target version changed from 6.1.0-beta1 to 2222
Updated by Oliver Hader over 11 years ago
- Project changed from 1382 to TYPO3 Core
Updated by Oliver Hader over 11 years ago
- Target version changed from 2222 to 6.0.5
- TYPO3 Version set to 6.0
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed
Actions