84 protected function init() {
92 if (!$this->fileOrFolderObject) {
93 $title =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', TRUE);
94 $message =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', TRUE);
95 throw new \RuntimeException(
$title .
': ' . $message, 1294586844);
97 if ($this->fileOrFolderObject->getStorage()->getUid() === 0) {
98 throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException(
'You are not allowed to access files outside your storages', 1375889840);
105 if ($this->fileOrFolderObject instanceof \
TYPO3\CMS\Core\Resource\Folder) {
106 $parsedUrl = parse_url($this->returnUrl);
108 if ($queryParts[
'id'] === $this->fileOrFolderObject->getCombinedIdentifier()) {
109 $this->returnUrl = str_replace(urlencode($queryParts[
'id']), urlencode($this->fileOrFolderObject->getStorage()->getRootLevelFolder()->getCombinedIdentifier()), $this->returnUrl);
114 $this->title = $icon . htmlspecialchars($this->fileOrFolderObject->getStorage()->getName()) .
': ' . htmlspecialchars($this->fileOrFolderObject->getIdentifier());
117 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/file_rename.html');
118 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
119 $this->doc->JScode = $this->doc->wrapScriptTags(
' 120 function backToList() { // 121 top.goToModule("file_list"); 133 $this->content = $this->doc->startPage(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
134 $pageContent = $this->doc->header(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_rename.php.pagetitle'));
135 $pageContent .= $this->doc->spacer(5);
136 $pageContent .= $this->doc->divider(5);
137 if ($this->fileOrFolderObject instanceof \
TYPO3\CMS\Core\Resource\Folder) {
138 $fileIdentifier = $this->fileOrFolderObject->getCombinedIdentifier();
140 $fileIdentifier = $this->fileOrFolderObject->getUid();
142 $code =
'<form action="tce_file.php" method="post" name="editform">';
147 <input type="text" name="file[rename][0][target]" value="' . htmlspecialchars($this->fileOrFolderObject->getName()) .
'"' .
$GLOBALS[
'TBE_TEMPLATE']->formWidth(40) .
' /> 148 <input type="hidden" name="file[rename][0][data]" value="' . htmlspecialchars($fileIdentifier) .
'" /> 154 <input type="submit" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_rename.php.submit', TRUE) .
'" /> 155 <input type="submit" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) .
'" onclick="backToList(); return false;" /> 156 <input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) .
'" /> 162 $pageContent .= $code;
163 $docHeaderButtons = array(
168 if ($this->returnUrl) {
172 $markerArray = array(
173 'CSH' => $docHeaderButtons[
'csh'],
174 'FUNC_MENU' =>
BackendUtility::getFuncMenu($this->
id,
'SET[function]', $this->MOD_SETTINGS[
'function'], $this->MOD_MENU[
'function']),
175 'CONTENT' => $pageContent,
176 'PATH' => $this->title
178 $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
179 $this->content .= $this->doc->endPage();
180 $this->content = $this->doc->insertStylesAndJS($this->content);
static explodeUrl2Array($string, $multidim=FALSE)
static cshItem($table, $field, $BACK_PATH, $wrap='', $onlyIconMode=FALSE, $styleAttrib='')
static makeInstance($className)
static getSpriteIcon($iconName, array $options=array(), array $overlays=array())
static getFuncMenu($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
static sanitizeLocalUrl($url='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static linkThisUrl($url, array $getParams=array())