Project

General

Profile

Bug #18665 » mp-sub-pages.diff

Administrator Admin, 2008-04-22 12:15

View differences:

t3lib/class.t3lib_page.php (working copy)
if ($GLOBALS['TYPO3_CONF_VARS']['FE']['enable_mount_pids']) {
// 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');
$pageRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
$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'];
$firstPageUid = intval($pageRec['uid']);
}
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');
$pageRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
$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!
}
// Look for mount pid value plus other required circumstances:
$mount_pid = intval($pageRec['mount_pid']);
if (is_array($pageRec) && $pageRec['doktype']==7 && $mount_pid>0 && !in_array($mount_pid, $prevMountPids)) {
(1-1/2)