*** D:\Typo3_src\typo3_src-4.0beta1\typo3\sysext\cms\tslib\class.tslib_content.php Wed Dec 28 10:58:16 2005 UTC --- D:\Typo3_src\typo3_src-4.0beta1\tslib\class.tslib_content.php Mon Jan 16 22:24:07 2006 UTC *************** *** 6667,6672 **** $mayEdit = count($allow)&&($perms&16); if ($conf['newRecordFromTable']) { $newUid=$GLOBALS['TSFE']->id; } else { $newUid = -1*$uid; } --- 6667,6676 ---- $mayEdit = count($allow)&&($perms&16); if ($conf['newRecordFromTable']) { $newUid=$GLOBALS['TSFE']->id; + + if ($conf['newRecordInPid']) { + $newUid=$conf['newRecordInPid']; + } } else { $newUid = -1*$uid; } *************** *** 6751,6759 **** } if (isset($allow['new'])) { if ($table=='pages') { ! $panel.=$this->editPanelLinkWrap('',$formName,'new',$currentRecord); } else { ! $panel.=$this->editPanelLinkWrap('',$formName,'new',$currentRecord); } } if (isset($allow['delete'])) {$panel.=$this->editPanelLinkWrap('',$formName,'delete','',$BE_USER->extGetLL('p_deleteConfirm')); } --- 6755,6763 ---- } if (isset($allow['new'])) { if ($table=='pages') { ! $panel.=$this->editPanelLinkWrap('',$formName,'new',$currentRecord,'',$conf['newRecordInPid']); } else { ! $panel.=$this->editPanelLinkWrap('',$formName,'new',$currentRecord,'',$conf['newRecordInPid']); } } if (isset($allow['delete'])) {$panel.=$this->editPanelLinkWrap('',$formName,'delete','',$BE_USER->extGetLL('p_deleteConfirm')); } *************** *** 6869,6875 **** * @access private * @see editPanel(), editIcons(), t3lib_tsfeBeUserAuth::extEditAction() */ ! function editPanelLinkWrap($string,$formName,$cmd,$currentRecord='',$confirm='') { $eFONPage = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editFormsOnPage']; $nV=t3lib_div::_GP('ADMCMD_view')?1:0; $adminURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir; --- 6873,6879 ---- * @access private * @see editPanel(), editIcons(), t3lib_tsfeBeUserAuth::extEditAction() */ ! function editPanelLinkWrap($string,$formName,$cmd,$currentRecord='',$confirm='',$nPid='') { $eFONPage = $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['edit_editFormsOnPage']; $nV=t3lib_div::_GP('ADMCMD_view')?1:0; $adminURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL').TYPO3_mainDir; *************** *** 6882,6888 **** if ($rParts[0]=='pages') { $out=$this->editPanelLinkWrap_doWrap($string,$adminURL.'db_new.php?id='.$rParts[1].'&pagesOnly=1',$currentRecord); } else { $nPid = t3lib_div::testInt($rParts[1]) ? -$rParts[1] : $GLOBALS['TSFE']->id; $out=$this->editPanelLinkWrap_doWrap($string,$adminURL.'alt_doc.php?edit['.$rParts[0].']['.$nPid.']=new&noView='.$nV,$currentRecord); } } else { --- 6886,6894 ---- if ($rParts[0]=='pages') { $out=$this->editPanelLinkWrap_doWrap($string,$adminURL.'db_new.php?id='.$rParts[1].'&pagesOnly=1',$currentRecord); } else { + if (!$nPid) { $nPid = t3lib_div::testInt($rParts[1]) ? -$rParts[1] : $GLOBALS['TSFE']->id; + } $out=$this->editPanelLinkWrap_doWrap($string,$adminURL.'alt_doc.php?edit['.$rParts[0].']['.$nPid.']=new&noView='.$nV,$currentRecord); } } else {