Project

General

Profile

Bug #17816 ยป preview_bug.patch

Administrator Admin, 2009-11-03 13:23

View differences:

typo3_src-4.2.9/t3lib/class.t3lib_userauthgroup.php 2009-11-03 12:44:47.000000000 +0100
$id = intval($id);
// Check if input id is an offline version page in which case we will map id to the online version:
$checkRec = t3lib_beFUnc::getRecord('pages',$id,'pid,t3ver_oid');
//$checkRec = t3lib_beFUnc::getRecord('pages',$id,'pid,t3ver_oid');
// Andreas Heling: $checkRec is null if no TCA array exists.
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pid,t3ver_oid','pages','uid='.intval($id));
$checkRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
$GLOBALS['TYPO3_DB']->sql_free_result($res);
// -------------------
if ($checkRec['pid']==-1) {
$id = intval($checkRec['t3ver_oid']);
}
    (1-1/1)