Index: t3lib/class.t3lib_page.php =================================================================== --- t3lib/class.t3lib_page.php (revision 3309) +++ t3lib/class.t3lib_page.php (working copy) @@ -724,15 +724,10 @@ if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids']) { - // Set first Page uid: - if (!$firstPageUid) { - $firstPageUid = $pageRec['uid']; + if (isset($this->cache_getMountPointInfo[$pageId])) { + return $this->cache_getMountPointInfo[$pageId]; } - if (isset($this->cache_getMountPointInfo[$pageId][$firstPageUid])) { - return $this->cache_getMountPointInfo[$pageId][$firstPageUid]; - } - // Get pageRec if not supplied: if (!is_array($pageRec)) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,pid,doktype,mount_pid,mount_pid_ol,t3ver_state', 'pages', 'uid='.intval($pageId).' AND pages.deleted=0 AND pages.doktype!=255'); @@ -741,6 +736,10 @@ $this->versionOL('pages',$pageRec); // Only look for version overlay if page record is not supplied; This assumes that the input record is overlaid with preview version, if any! } + // Set first Page uid: + if (!$firstPageUid) { + $firstPageUid = $pageRec['uid']; + } // Look for mount pid value plus other required circumstances: $mount_pid = intval($pageRec['mount_pid']); @@ -773,7 +772,7 @@ } } - $this->cache_getMountPointInfo[$pageId][$firstPageUid] = $result; + $this->cache_getMountPointInfo[$pageId] = $result; return $result; }