Feature #17037 » 5066_4.1.2.patch
typo3_src-4.1.2.new/t3lib/class.t3lib_page.php 2007-07-23 13:22:43.000000000 +0200 | ||
---|---|---|
// if shortcut, look up if the target exists and is currently visible
|
||
if ($row['doktype'] == 4 && ($row['shortcut'] || $row['shortcut_mode']) && $checkShortcuts) {
|
||
$shortcut_parts = explode('_', $row['shortcut']);
|
||
$shortcut_uid = intval(array_pop($shortcut_parts));
|
||
$shortcut_table = implode('_', $shortcut_parts);
|
||
if ($shortcut_table == 'tt_content' && is_array($shortcut_ttcontent = $this->getRawRecord('tt_content', $shortcut_uid, 'pid'))) {
|
||
// if shortcutted to a tt_content element, we don't check for visibility of this element except deletion but fall back to the page
|
||
$shortcut_uid = $shortcut_ttcontent['pid'];
|
||
}
|
||
if ($row['shortcut_mode'] == 0) {
|
||
$searchField = 'uid';
|
||
$searchUid = intval($row['shortcut']);
|
||
$searchUid = $shortcut_uid;
|
||
} else { // check subpages - first subpage or random subpage
|
||
$searchField = 'pid';
|
||
// If a shortcut mode is set and no valid page is given to select subpags from use the actual page.
|
||
$searchUid = intval($row['shortcut'])?intval($row['shortcut']):$row['uid'];
|
||
$searchUid = ($shortcut_uid>0)?$shortcut_uid:$row['uid'];
|
||
}
|
||
$res2 = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', $searchField.'='.$searchUid.$this->where_hid_del.$this->where_groupAccess.' '.$addWhere, '', $sortField);
|
||
if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res2)) {
|
typo3_src-4.1.2.new/typo3/sysext/cms/ext_tables.php 2007-07-23 13:25:48.000000000 +0200 | ||
---|---|---|
'config' => Array (
|
||
'type' => 'group',
|
||
'internal_type' => 'db',
|
||
'allowed' => 'pages',
|
||
'allowed' => 'pages,tt_content',
|
||
'size' => '3',
|
||
'maxitems' => '1',
|
||
'minitems' => '0',
|
typo3_src-4.1.2.new/typo3/sysext/cms/ext_tables.sql 2007-07-23 13:22:43.000000000 +0200 | ||
---|---|---|
starttime int(11) unsigned DEFAULT '0' NOT NULL,
|
||
endtime int(11) unsigned DEFAULT '0' NOT NULL,
|
||
urltype tinyint(4) unsigned DEFAULT '0' NOT NULL,
|
||
shortcut int(10) unsigned DEFAULT '0' NOT NULL,
|
||
shortcut tinyint DEFAULT '0' NOT NULL,
|
||
shortcut_mode int(10) unsigned DEFAULT '0' NOT NULL,
|
||
no_cache int(10) unsigned DEFAULT '0' NOT NULL,
|
||
fe_group varchar(100) DEFAULT '0' NOT NULL,
|
typo3_src-4.1.2.new/typo3/sysext/cms/tslib/class.tslib_fe.php 2007-07-23 13:22:43.000000000 +0200 | ||
---|---|---|
// Is the ID a link to another page??
|
||
if ($this->page['doktype']==4) {
|
||
$this->MP = ''; // We need to clear MP if the page is a shortcut. Reason is if the short cut goes to another page, then we LEAVE the rootline which the MP expects.
|
||
$this->page = $this->getPageShortcut($this->page['shortcut'],$this->page['shortcut_mode'],$this->page['uid']);
|
||
// Handle type of shortcut: Either of type pages or anything else (e.g. tt_content)
|
||
$shortcut_parts = explode('_', $this->page['shortcut']);
|
||
$shortcut_uid = array_pop($shortcut_parts);
|
||
$shortcut_table = implode('_', $shortcut_parts);
|
||
if (strlen($shortcut_table)==0 || $shortcut_table=='pages') {
|
||
$this->page = $this->getPageShortcut($shortcut_uid,$this->page['shortcut_mode'],$this->page['uid']);
|
||
} else {
|
||
$shortcut_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pid', $shortcut_table, 'uid='.$shortcut_uid);
|
||
if ($shortcut_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($shortcut_res)) {
|
||
$GLOBALS['TYPO3_DB']->sql_free_result($shortcut_res);
|
||
$this->page = $this->getPageShortcut($shortcut_row['pid'],$this->page['shortcut_mode'],$this->page['uid']);
|
||
}
|
||
}
|
||
$this->id = $this->page['uid'];
|
||
}
|
||
typo3_src-4.1.2.new/typo3/sysext/cms/tslib/class.tslib_menu.php 2007-07-23 13:22:43.000000000 +0200 | ||
---|---|---|
$thePage = $this->sys_page->getPage($this->menuArr[$key]['pid']);
|
||
$LD = $this->tmpl->linkData($thePage,$mainTarget,'','',$overrideArray, $this->mconf['addParams'].$MP_params.$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
|
||
} else {
|
||
$LD = $this->tmpl->linkData($this->menuArr[$key],$mainTarget,'','',$overrideArray, $this->mconf['addParams'].$MP_params.$this->I['val']['additionalParams'].$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
|
||
if ($this->menuArr[$key]['doktype'] == 4) {
|
||
// Handle shortcut item (may be an anchorlink to a tt_content element as well)
|
||
$shortcut_page = $this->menuArr[$key];
|
||
if (strlen($shortcut_page['shortcut'])>0 && $shortcut_page['shortcut'] != '0') {
|
||
$shortcut_parts = explode('_', $shortcut_page['shortcut']);
|
||
$shortcut_uid = intval(array_pop($shortcut_parts));
|
||
$shortcut_table = implode('_', $shortcut_parts);
|
||
if ($shortcut_table == 'tt_content' && is_array($shortcut_ttcontent = $this->sys_page->getRawRecord('tt_content', $shortcut_uid, 'uid,pid'))) {
|
||
$shortcut_page = $this->sys_page->getPage($shortcut_ttcontent['pid']);
|
||
if (is_array($shortcut_page)) {
|
||
$shortcut_page['sectionIndex_uid'] = $shortcut_ttcontent['uid'];
|
||
}
|
||
} elseif ($shortcut_table == 'pages') {
|
||
$shortcut_page = $this->sys_page->getPage($shortcut_uid);
|
||
}
|
||
}
|
||
$LD = $this->tmpl->linkData($shortcut_page,$mainTarget,'','',$overrideArray, $this->mconf['addParams'].$MP_params.$this->I['val']['additionalParams'].$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
|
||
} else {
|
||
$LD = $this->tmpl->linkData($this->menuArr[$key],$mainTarget,'','',$overrideArray, $this->mconf['addParams'].$MP_params.$this->I['val']['additionalParams'].$this->menuArr[$key]['_ADD_GETVARS'], $typeOverride);
|
||
}
|
||
}
|
||
// Override URL if using "External URL" as doktype with a valid e-mail address:
|