Project

General

Profile

Bug #19659 » file_newfolder.php

Administrator Admin, 2008-11-28 20:55

 
Index: typo3/file_newfolder.php
===================================================================
--- typo3/file_newfolder.php (revision 4494)
+++ typo3/file_newfolder.php (working copy)
@@ -117,6 +117,7 @@
* @return void
*/
function init() {
+ //TODO remove global
global $LANG,$BACK_PATH,$TYPO3_CONF_VARS;
// Initialize GPvars:
@@ -136,6 +137,7 @@
$this->target = $this->basicff->is_directory($this->target);
$key=$this->basicff->checkPathAgainstMounts($this->target.'/');
if (!$this->target || !$key) {
+ //TODO LL: Parameter Error','Target was not a directory!','
t3lib_BEfunc::typo3PrintError ('Parameter Error','Target was not a directory!','');
exit;
}
@@ -184,6 +186,7 @@
* @return void
*/
function main() {
+ //TODO remove global, change $LANG into $GLOBALS['LANG'], change locallang*.php to locallang*.xml
global $LANG;
// start content compilation
@@ -203,9 +206,11 @@
$code .= '
<div id="c-select">
<select name="number" onchange="reload(this.options[this.selectedIndex].value);">';
- for ($a=1;$a<=$this->folderNumber;$a++) {
- $code.='
- <option value="'.$a.'"'.($this->number==$a?' selected="selected"':'').'>'.$a.' '.$LANG->sL('LLL:EXT:lang/locallang_core.php:file_newfolder.php.folders',1).'</option>';
+ for ($a = 1; $a <= $this->folderNumber; $a++) {
+ $code .=
+ '<option value="' . $a . '"' . ($this->number == $a ? ' selected="selected"' : '') . '>' .
+ $a . ' ' . ($a == 1 ? $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:folder', true) : $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:folders', true)) .
+ '</option>';
}
$code.='
</select>
Index: typo3/sysext/lang/locallang_mod_file_list.xml
===================================================================
--- typo3/sysext/lang/locallang_mod_file_list.xml (revision 4494)
+++ typo3/sysext/lang/locallang_mod_file_list.xml (working copy)
@@ -21,6 +21,8 @@
<label index="c_rw">RW</label>
<label index="c__REF_">Ref</label>
<label index="files">files</label>
+ <label index="folder">Folder</label>
+ <label index="folders">Folders</label>
<label index="temp">Temporary files</label>
<label index="recycler">Recycler</label>
<label index="mlang_labels_tablabel">Listing of files in the directory</label>
Index: typo3/sysext/lang/locallang_core.xml
===================================================================
--- typo3/sysext/lang/locallang_core.xml (revision 4494)
+++ typo3/sysext/lang/locallang_core.xml (working copy)
@@ -136,7 +136,6 @@
<label index="file_edit.php.coundNot">This filetype cannot be edited.&lt;br /&gt;The file must have an extension like:&lt;br /&gt;&lt;br /&gt; &lt;b&gt;%s&lt;/b&gt;</label>
<label index="file_newfolder.php.pagetitle">New file or folder</label>
<label index="file_newfolder.php.submit">Create folders</label>
- <label index="file_newfolder.php.folders">folders</label>
<label index="file_newfolder.php.newfile_submit">Create file</label>
<label index="file_newfolder.php.newfile">Create new textfile</label>
<label index="file_clipupload.php.warning_head">Upload path error</label>
(1-1/2)