Bug #16561 ยป 4213_v1.diff
t3lib/class.t3lib_page.php (working copy) | ||
---|---|---|
* @return array The page row with overlayed localized fields. Empty it no page.
|
||
* @see getPage_noCheck()
|
||
*/
|
||
function getPage($uid, $disableGroupAccessCheck=FALSE) {
|
||
function getPage($uid, $disableGroupAccessCheck=FALSE,$userRootlineCheck=FALSE) {
|
||
$accessCheck = $disableGroupAccessCheck ? '' : $this->where_groupAccess;
|
||
$cacheKey = md5($accessCheck . '-' . $this->where_hid_del . '-' . $this->sys_language_uid);
|
||
... | ... | |
$result = array();
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid='.intval($uid).$this->where_hid_del.$accessCheck);
|
||
$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
|
||
$check = ($userRootlineCheck ? $this->checkPage($uid) : TRUE );
|
||
|
||
$GLOBALS['TYPO3_DB']->sql_free_result($res);
|
||
if ($row) {
|
||
|
||
if ($row && $check) {
|
||
$this->versionOL('pages',$row);
|
||
if (is_array($row)) {
|
||
$result = $this->getPageOverlay($row);
|
||
... | ... | |
return $result;
|
||
}
|
||
function checkPage($uid) {
|
||
$MP = t3lib_div::_GP('MP');
|
||
$rootLine = $this->getRootLine($uid,$MP);
|
||
while(list($k,$page) = each($rootLine)){
|
||
if ($page['extendToSubpages'] && !$GLOBALS['TSFE']->checkEnableFields($page)) {
|
||
return FALSE;
|
||
}
|
||
}
|
||
return TRUE;
|
||
}
|
||
/**
|
||
* Return the $row for the page with uid = $uid WITHOUT checking for ->where_hid_del (start- and endtime or hidden). Only "deleted" is checked!
|
||
*
|
index.php (working copy) | ||
---|---|---|
error_reporting (E_ALL ^ E_NOTICE);
|
||
// ******************
|
||
// Constants defined
|
||
// ******************
|
typo3/sysext/cms/tslib/class.tslib_content.php (working copy) | ||
---|---|---|
}
|
||
// Looking up the page record to verify its existence:
|
||
$page = $GLOBALS['TSFE']->sys_page->getPage($link_param,$disableGroupAccessCheck);
|
||
$page = $GLOBALS['TSFE']->sys_page->getPage($link_param,$disableGroupAccessCheck,TRUE);
|
||
if (count($page)) {
|
||
// MointPoints, look for closest MPvar:
|
||
... | ... | |
// Look for overlay Mount Point:
|
||
$mount_info = $GLOBALS['TSFE']->sys_page->getMountPointInfo($page['uid'], $page);
|
||
if (is_array($mount_info) && $mount_info['overlay']) {
|
||
$page = $GLOBALS['TSFE']->sys_page->getPage($mount_info['mount_pid'],$disableGroupAccessCheck);
|
||
$page = $GLOBALS['TSFE']->sys_page->getPage($mount_info['mount_pid'],$disableGroupAccessCheck,TRUE);
|
||
if (!count($page)) {
|
||
$GLOBALS['TT']->setTSlogMessage("typolink(): Mount point '".$mount_info['mount_pid']."' was not available, so '".$linktxt."' was not linked.",1);
|
||
return $linktxt;
|
||
... | ... | |
$page2 = $page; // Save in case of broken destination or endless loop
|
||
$maxLoopCount = 20; // Same as in RealURL, seems enough
|
||
while ($maxLoopCount && is_array($page) && $page['doktype'] == 4 && $page['shortcut_mode'] == 0) {
|
||
$page = $GLOBALS['TSFE']->sys_page->getPage($page['shortcut'], $disableGroupAccessCheck);
|
||
$page = $GLOBALS['TSFE']->sys_page->getPage($page['shortcut'], $disableGroupAccessCheck,TRUE);
|
||
$maxLoopCount--;
|
||
}
|
||
if (count($page) == 0 || $maxLoopCount == 0) {
|