Feature #23156 » 23156.diff
typo3/sysext/indexed_search/Classes/Controller/SearchController.php | ||
---|---|---|
}
|
||
// Print a message telling which words in which sections we searched for
|
||
if (substr($this->searchData['sections'], 0, 2) == 'rl') {
|
||
$result['searchedInSectionInfo'] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.inSection', 'indexed_search') . ' "' . substr($this->getPathFromPageId(substr($this->searchData['sections'], 4)), 1) . '"';
|
||
$result['searchedInSectionInfo'] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.inSection', 'indexed_search') . ' "' . $this->getPathFromPageId(substr($this->searchData['sections'], 4)) . '"';
|
||
}
|
||
return $result;
|
||
}
|
||
... | ... | |
$sectionTitleLinked = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.unnamedSection', 'indexed_search') . ':';
|
||
} else {
|
||
$onclick = 'document.' . $this->prefixId . '[\'' . $this->prefixId . '[_sections]\'].value=\'' . $theRLid . '\';document.' . $this->prefixId . '.submit();return false;';
|
||
$sectionTitleLinked = '<a href="#" onclick="' . htmlspecialchars($onclick) . '">' . htmlspecialchars($sectionName) . ':</a>';
|
||
$sectionTitleLinked = '<a href="#" onclick="' . htmlspecialchars($onclick) . '">' . $sectionName . ':</a>';
|
||
}
|
||
$this->resultSections[$id] = array($sectionName, count($resultRows));
|
||
// Add section header
|
||
... | ... | |
} else {
|
||
$pathId = $row['data_page_id'] ? $row['data_page_id'] : $row['page_id'];
|
||
$pathMP = $row['data_page_id'] ? $row['data_page_mp'] : '';
|
||
$pathStr = htmlspecialchars($this->getPathFromPageId($pathId, $pathMP));
|
||
$pathStr = $this->getPathFromPageId($pathId, $pathMP);
|
||
$resultData['path'] = $this->linkPage($pathId, $pathStr, array(
|
||
'cHashParams' => $row['cHashParams'],
|
||
'data_page_type' => $row['data_page_type'],
|
||
... | ... | |
* Returns the path to the page $id
|
||
*
|
||
* @param integer $id Page ID
|
||
* @param string MP variable content
|
||
* @return string Path
|
||
* @param string $pathMP variable content
|
||
* @return string Path (HTML-escaped)
|
||
*/
|
||
protected function getPathFromPageId($id, $pathMP = '') {
|
||
$identStr = $id . '|' . $pathMP;
|
||
... | ... | |
$this->domainRecords[$id] = array();
|
||
$rl = $GLOBALS['TSFE']->sys_page->getRootLine($id, $pathMP);
|
||
$path = '';
|
||
if (is_array($rl) && count($rl)) {
|
||
$pageCount = count($rl);
|
||
if (is_array($rl) && $pageCount) {
|
||
$index = 0;
|
||
$pathSeparator = isset($this->conf['pathCharacter']) ? $this->conf['pathCharacter'] : '/';
|
||
$pathSeparators = $GLOBALS['TSFE']->tmpl->splitConfArray(array('separator' => $pathSeparator), $pageCount);
|
||
foreach ($rl as $k => $v) {
|
||
// Check fe_user
|
||
if ($v['fe_group'] && ($v['uid'] == $id || $v['extendToSubpages'])) {
|
||
... | ... | |
if ($v['uid'] == $GLOBALS['TSFE']->config['rootLine'][0]['uid']) {
|
||
break;
|
||
}
|
||
$path = '/' . $v['title'] . $path;
|
||
$path = $pathSeparators[$index]['separator'] . htmlspecialchars($v['title']) . $path;
|
||
$index++;
|
||
}
|
||
if (isset($this->conf['pathCharacter'])) {
|
||
$path .= $pathSeparators[$index]['separator'];
|
||
}
|
||
}
|
||
$this->pathCache[$identStr] = $path;
|
typo3/sysext/indexed_search/ext_typoscript_setup.txt | ||
---|---|---|
modified =
|
||
}
|
||
pathCharacter = / |*| / |*|  
|
||
show {
|
||
rules = 1
|
||
parsetimes = 0
|
- « Previous
- 1
- 2
- Next »