Bug #10693 » forge10693.diff
typo3/alt_doc.php (working copy) | ||
---|---|---|
var $errorC; // Counter, used to count the number of errors (when users do not have edit permissions)
|
||
var $newC; // Counter, used to count the number of new record forms displayed
|
||
var $viewId; // Is set to the pid value of the last shown record - thus indicating which page to show when clicking the SAVE/VIEW button
|
||
var $previewId; // An alternate id for the SAVE/VIEW button, when previewing pages in workspaces
|
||
var $viewId_addParams; // Is set to additional parameters (like "&L=xxx") if the record supports it.
|
||
var $modTSconfig; // Module TSconfig, loaded from main() based on the page id value of viewId
|
||
... | ... | |
$deniedAccessReason = '';
|
||
$deleteAccess = 0;
|
||
$this->viewId = 0;
|
||
$this->previewId = 0;
|
||
// If the command is to create a NEW record...:
|
||
if ($cmd=='new') {
|
||
... | ... | |
$hasAccess = $CALC_PERMS&2 ? 1 : 0;
|
||
$deleteAccess = $CALC_PERMS&4 ? 1 : 0;
|
||
$this->viewId = $calcPRec['uid'];
|
||
// If the page is a version of an existing page, store the original page's uid
|
||
// (see compileForm() for usage)
|
||
$this->previewId = $calcPRec['t3ver_oid'];
|
||
} else {
|
||
$CALC_PERMS = $BE_USER->calcPerms(t3lib_BEfunc::getRecord('pages',$calcPRec['pid'])); // Fetching pid-record first.
|
||
$hasAccess = $CALC_PERMS&16 ? 1 : 0;
|
||
... | ... | |
if ($this->returnNewPageId) {
|
||
$formContent .= '<input type="hidden" name="returnNewPageId" value="1" />';
|
||
}
|
||
$formContent .= '<input type="hidden" name="popViewId" value="'.htmlspecialchars($this->viewId).'" />';
|
||
$viewId = (empty($this->previewId)) ? $this->viewId : $this->previewId;
|
||
$formContent .= '<input type="hidden" name="popViewId" value="'.htmlspecialchars($viewId).'" />';
|
||
if ($this->viewId_addParams) {
|
||
$formContent .= '<input type="hidden" name="popViewId_addParams" value="'.htmlspecialchars($this->viewId_addParams).'" />';
|
||
}
|