Project

General

Profile

Bug #24183 » patch_24183_part.diff

Bernd Wilke, 2011-04-28 14:51

View differences:

typo3_src-4.5.2/typo3/sysext/cms/tslib/class.tslib_fe.php 2011-04-28 13:55:19.673069673 +0200
// Initialize the page-select functions.
$this->sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
// set the language if we have one:
$this->sys_page->sys_language_uid = $this->sys_language_uid;
$this->sys_page->versioningPreview = ($this->fePreview===2 || intval($this->workspacePreview) || t3lib_div::_GP('ADMCMD_view')) ? TRUE : FALSE;
$this->sys_page->versioningWorkspaceId = $this->whichWorkspace();
$this->sys_page->init($this->showHiddenPage);
......
list($this->sys_language_mode,$sys_language_content) = t3lib_div::trimExplode(';', $this->config['config']['sys_language_mode']);
$this->sys_language_contentOL = $this->config['config']['sys_language_overlay'];
// Setting sys_language_uid as early as possible inside sys-page:
$this->sys_page->sys_language_uid = $this->sys_language_uid;
// If sys_language_uid is set to another language than default:
if ($this->sys_language_uid>0) {
......
if (!is_null($this->originalShortcutPage)) {
$originalShortcutPageOverlay = $this->sys_page->getPageOverlay($this->originalShortcutPage['uid'], $this->sys_language_uid);
if (!empty($originalShortcutPageOverlay['shortcut']) && $originalShortcutPageOverlay['shortcut'] != $this->id) {
if ( !empty($originalShortcutPageOverlay['doktype'])
&& $originalShortcutPageOverlay['doktype'] != t3lib_pageSelect::DOKTYPE_SHORTCUT) {
// we are wrong. there was no shortcut for this language!
// try to get the original page with correct doktype
$this->id = $this->contentPid = $this->originalShortcutPage['uid'];
$this->page = $this->sys_page->getPage($this->id);
// fix various effects on things like menus f.e.
$this->fetch_the_id();
$this->tmpl->rootLine = array_reverse($this->rootLine);
} elseif (!empty($originalShortcutPageOverlay['shortcut']) && $originalShortcutPageOverlay['shortcut'] != $this->id) {
// the translation of the original shortcut page has a different shortcut target!
// set the correct page and id
(3-3/3)