Project

General

Profile

Feature #15371 » class.tslib_content.php.diff-u (stdWrap).txt

Administrator Admin, 2006-01-17 02:09

 
*** 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 Tue Jan 17 01:07:57 2006 UTC
***************
*** 6645,6650 ****
$conf['allow']='new';
}
if (!$currentRecord) $currentRecord=$this->currentRecord;
if (!count($dataArr)) $dataArr=$this->data;
list($table,$uid) = explode(':',$currentRecord);
--- 6645,6654 ----
$conf['allow']='new';
}
+ $nPid = $conf['newRecordInPid'];
+ if ($conf['newRecordInPid.']) $nPid = $this->stdWrap($conf['newRecordInPid'],$conf['newRecordInPid.']);
+ if (!intval($nPid)) $nPid = $GLOBALS['TSFE']->id;
+
if (!$currentRecord) $currentRecord=$this->currentRecord;
if (!count($dataArr)) $dataArr=$this->data;
list($table,$uid) = explode(':',$currentRecord);
***************
*** 6667,6672 ****
$mayEdit = count($allow)&&($perms&16);
if ($conf['newRecordFromTable']) {
$newUid=$GLOBALS['TSFE']->id;
} else {
$newUid = -1*$uid;
}
--- 6671,6680 ----
$mayEdit = count($allow)&&($perms&16);
if ($conf['newRecordFromTable']) {
$newUid=$GLOBALS['TSFE']->id;
+
+ if ($nPid) {
+ $newUid=$nPid;
+ }
} else {
$newUid = -1*$uid;
}
***************
*** 6751,6759 ****
}
if (isset($allow['new'])) {
if ($table=='pages') {
! $panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/new_page.gif" width="13" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_newSubpage').'" align="top" alt="" title="" />',$formName,'new',$currentRecord);
} else {
! $panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/new_record.gif" width="16" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_newRecordAfter').'" align="top" alt="" title="" />',$formName,'new',$currentRecord);
}
}
if (isset($allow['delete'])) {$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/delete_record.gif" width="12" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_delete').'" align="top" alt="" title="" />',$formName,'delete','',$BE_USER->extGetLL('p_deleteConfirm')); }
--- 6759,6767 ----
}
if (isset($allow['new'])) {
if ($table=='pages') {
! $panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/new_page.gif" width="13" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_newSubpage').'" align="top" alt="" title="" />',$formName,'new',$currentRecord,'',$nPid);
} else {
! $panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/new_record.gif" width="16" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_newRecordAfter').'" align="top" alt="" title="" />',$formName,'new',$currentRecord,'',$nPid);
}
}
if (isset($allow['delete'])) {$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/delete_record.gif" width="12" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_delete').'" align="top" alt="" title="" />',$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;
--- 6877,6883 ----
* @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 {
--- 6890,6898 ----
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 {
(3-3/5)