95 protected function init() {
101 if ($combinedIdentifier) {
105 if (!$this->folderObject) {
106 $title =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_mod_file_list.xlf:paramError', TRUE);
107 $message =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_mod_file_list.xlf:targetNoDir', TRUE);
108 throw new \RuntimeException(
$title .
': ' . $message, 1294586845);
110 if ($this->folderObject->getStorage()->getUid() === 0) {
111 throw new \TYPO3\CMS\Core\Resource\Exception\InsufficientFolderAccessPermissionsException(
'You are not allowed to access folders outside your storages', 1375889838);
116 $this->title = $icon . htmlspecialchars($this->folderObject->getStorage()->getName()) .
': ' . htmlspecialchars($this->folderObject->getIdentifier());
119 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/file_newfolder.html');
120 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
121 $this->doc->JScode = $this->doc->wrapScriptTags(
' 122 var path = "' . $this->target .
'"; 124 function reload(a) { // 126 var params = "&target="+encodeURIComponent(path)+"&number="+a+"&returnUrl=' . rawurlencode($this->returnUrl) .
'"; 127 window.location.href = "file_newfolder.php?"+params; 130 function backToList() { // 131 top.goToModule("file_list"); 145 $this->content .= $this->doc->startPage(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle'));
147 $pageContent = $this->doc->header(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle'));
148 $pageContent .= $this->doc->spacer(5);
149 $pageContent .= $this->doc->divider(5);
150 if ($this->folderObject->checkActionPermission(
'add')) {
151 $code =
'<form action="tce_file.php" method="post" name="editform">';
156 <label for="number-of-new-folders">' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.number_of_folders') .
'</label> 157 <select name="number" id="number-of-new-folders" onchange="reload(this.options[this.selectedIndex].value);">';
159 $code .=
'<option value="' . $a .
'"' . ($this->number == $a ?
' selected="selected"' :
'') .
'>' . $a .
'</option>';
167 <div id="c-createFolders"> 171 <input' . $this->doc->formWidth(20) .
' type="text" name="file[newfolder][' . $a .
'][data]" onchange="changed=true;" /> 172 <input type="hidden" name="file[newfolder][' . $a .
'][target]" value="' . htmlspecialchars($this->target) .
'" /><br /> 180 <div id="c-submitFolders"> 181 <input type="submit" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.submit', TRUE) .
'" /> 182 <input type="submit" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) .
'" onclick="backToList(); return false;" /> 183 <input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) .
'" /> 189 $pageContent .= $code;
191 $pageContent .= $this->doc->spacer(10);
193 $pageContent .= $this->doc->sectionEnd() .
'</form>';
196 if ($this->folderObject->getStorage()->checkUserActionPermission(
'add',
'File')) {
197 $pageContent .=
'<form action="tce_file.php" method="post" name="editform2">';
199 $fileExtList = array();
201 foreach ($textfileExt as $fileExt) {
202 if (!preg_match((
'/' .
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileDenyPattern'] .
'/i'), (
'.' . $fileExt))) {
203 $fileExtList[] =
'*.' . $fileExt;
209 <p>[' . htmlspecialchars(implode(
', ', $fileExtList)) .
']</p> 210 <input' . $this->doc->formWidth(20) .
' type="text" name="file[newfile][0][data]" onchange="changed=true;" /> 211 <input type="hidden" name="file[newfile][0][target]" value="' . htmlspecialchars($this->target) .
'" /> 216 <div id="c-submitFiles"> 217 <input type="submit" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.newfile_submit', TRUE) .
'" /> 218 <input type="submit" value="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.cancel', TRUE) .
'" onclick="backToList(); return false;" /> 219 <input type="hidden" name="redirect" value="' . htmlspecialchars($this->returnUrl) .
'" /> 225 $pageContent .= $this->doc->section(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.newfile'), $code);
226 $pageContent .= $this->doc->sectionEnd();
227 $pageContent .=
'</form>';
230 $docHeaderButtons = array(
234 if ($this->returnUrl) {
238 $markerArray = array(
239 'CSH' => $docHeaderButtons[
'csh'],
240 'FUNC_MENU' =>
BackendUtility::getFuncMenu($this->
id,
'SET[function]', $this->MOD_SETTINGS[
'function'], $this->MOD_MENU[
'function']),
241 'CONTENT' => $pageContent,
242 'PATH' => $this->title
244 $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markerArray);
245 $this->content .= $this->doc->endPage();
246 $this->content = $this->doc->insertStylesAndJS($this->content);
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static quoteJSvalue($value)
static cshItem($table, $field, $BACK_PATH, $wrap='', $onlyIconMode=FALSE, $styleAttrib='')
static makeInstance($className)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
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())