Project

General

Profile

Bug #15128 » shortcut_patch.diff

Thorben Nissen, 2011-07-18 14:10

View differences:

./typo3/sysext/cms/tslib/class.tslib_fe.php 2011-07-18 13:52:32.000000000 +0200
$this->originalShortcutPage = $this->page;
$this->page = $this->getPageShortcut($this->page['shortcut'],$this->page['shortcut_mode'],$this->page['uid']);
$this->id = $this->page['uid'];
$url = 'index.php?id='.$this->page['uid'];
$status = t3lib_utility_Http::HTTP_STATUS_301;
if($this->page['shortcut_mode'] == t3lib_pageSelect::SHORTCUT_MODE_RANDOM_SUBPAGE) {
$status = t3lib_utility_Http:HTTP_STATUS_302;
}
t3lib_utility_Http::redirect($url, $status);
}
// Gets the rootLine
./typo3/sysext/cms/tslib/class.tslib_menu.php 2011-07-18 12:56:59.000000000 +0200
$LD['target'] = '';
}
/**
* @hack
* @author thorben@kapp-hamburg.de
* @date 2011-07-18
* @description added seperate link handling for shortcuts
*/
if($this->menuArr[$key]['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT) {
$shortcut = $GLOBALS['TSFE']->getPageShortcut($this->menuArr[$key]['shortcut'], $this->menuArr[$key]['schortcut_mode'], $this->menuArr[$key]['uid']);
$LD['totalURL'] = $this->parent_cObj->typoLink_URL(array('parameter' => $shortcut['uid']));
}
//debug($this->menuArr[$key]);
//debug(t3lib_div::isValidUrl($this->menuArr[$key]['url']));
if($this->menuArr[$key]['doktype'] == t3lib_pageSelect::DOKTYPE_LINK && !empty($this->menuArr[$key]['url'])) {
$LD['totalURL'] = $this->parent_cObj->typolink_URL(array('parameter' => $this->menuArr[$key]['url']));
}
// Manipulation in case of access restricted pages:
$this->changeLinksForAccessRestrictedPages($LD,$this->menuArr[$key],$mainTarget,$typeOverride);
......
$natVal = $this->isActive($this->menuArr[$key]['uid'], $this->getMPvar($key)) && $this->isSubMenu($this->menuArr[$key]['uid']);
break;
case 'CUR':
$natVal = $this->isCurrent($this->menuArr[$key]['uid'], $this->getMPvar($key));
if($this->menuArr[$key]['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT) {
$shortcut = $GLOBALS['TSFE']->getPageShortcut($this->menuArr[$key]['shortcut'], $this->menuArr[$key]['schortcut_mode'], $this->menuArr[$key]['uid']);
$natVal = $this->isCurrent($shortcut['uid'], $this->getMPvar($key));
} else {
$natVal = $this->isCurrent($this->menuArr[$key]['uid'], $this->getMPvar($key));
}
break;
case 'CURIFSUB':
$natVal = $this->isCurrent($this->menuArr[$key]['uid'], $this->getMPvar($key)) && $this->isSubMenu($this->menuArr[$key]['uid']);
if($this->menuArr[$key]['doktype'] == t3lib_pageSelect::DOKTYPE_SHORTCUT) {
$shortcut = $GLOBALS['TSFE']->getPageShortcut($this->menuArr[$key]['shortcut'], $this->menuArr[$key]['schortcut_mode'], $this->menuArr[$key]['uid']);
$natVal = $this->isCurrent($shortcut['uid'], $this->getMPvar($key)) && $this->isSubMenu($shortcut['uid']);
} else {
$natVal = $this->isCurrent($this->menuArr[$key]['uid'], $this->getMPvar($key)) && $this->isSubMenu($this->menuArr[$key]['uid']);
}
break;
case 'USR':
$natVal = $this->menuArr[$key]['fe_group'];
(5-5/5)