Index: typo3/file_edit.php =================================================================== --- typo3/file_edit.php (revision 6709) +++ typo3/file_edit.php (working copy) @@ -136,8 +136,12 @@ $this->doc->setModuleTemplate('templates/file_edit.html'); $this->doc->backPath = $BACK_PATH; $this->doc->JScode=$this->doc->wrapScriptTags(' - function backToList() { // - top.goToModule("file_list"); + function backToList(returnUrl) { // + if (returnUrl) { + document.location.href = returnUrl; + } else { + top.goToModule("file_list"); + } } '); $this->doc->form='
'; @@ -239,7 +243,11 @@ // Cancel button $theIcon = 'backPath,'gfx/closedok.gif','width="18" height="16"').' title="'.$GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.cancel',1)).'" alt="" />'; - $buttons['CANCEL'] = ''.$theIcon.''; + if ($this->returnUrl) { + $buttons['CANCEL'] = '' . $theIcon . ''; + } else { + $buttons['CANCEL'] = '' . $theIcon . ''; + } return $buttons; }