Fixed bug #9886: Hardcoded error messages (Parameter Error:) in some files related...
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 18 Dec 2008 18:10:00 +0000 (18:10 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Thu, 18 Dec 2008 18:10:00 +0000 (18:10 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4567 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/file_edit.php
typo3/file_newfolder.php
typo3/file_rename.php
typo3/file_upload.php
typo3/sysext/lang/locallang_mod_file_list.xml

index 758d8db..08c9a89 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        * Fixed bug #9944: Unneccessary wildcard string comparisons in EM (thanks to Marcus Krause)
        * Fixed bug #9947: gzip compression does not work in BE at all
        * Fixed bug #9971: A call to protected method in index_ts.php
+       * Fixed bug #9886: Hardcoded error messages (Parameter Error:) in some files related to file list module (thanks to Stefano Kowalke)
 
 2008-12-18  Thorsten Kahler  <thorsten.kahler@dkd.de>
 
index 00d1791..dbfaf80 100755 (executable)
@@ -103,6 +103,7 @@ class SC_file_edit {
         * @return      void
         */
        function init() {
+               //TODO remove global
                global $BACK_PATH,$TYPO3_CONF_VARS;
 
                        // Setting target, which must be a file reference to a file within the mounts.
@@ -121,7 +122,7 @@ class SC_file_edit {
                }
                $key=$this->basicff->checkPathAgainstMounts($this->target.'/');
                if (!$this->target || !$key)    {
-                       t3lib_BEfunc::typo3PrintError ('Parameter Error','Target was not a directory!','');
+                       t3lib_BEfunc::typo3PrintError($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), '');
                        exit;
                }
                        // Finding the icon
@@ -159,6 +160,7 @@ class SC_file_edit {
         * @return      void
         */
        function main() {
+               //TODO remove global, change $LANG into $GLOBALS['LANG'], change locallang*.php to locallang*.xml
                global $BE_USER, $LANG, $TYPO3_CONF_VARS;
                $docHeaderButtons = $this->getButtons();
 
index 67f82df..4a8d64a 100755 (executable)
@@ -136,7 +136,7 @@ class SC_file_newfolder {
                $this->target = $this->basicff->is_directory($this->target);
                $key=$this->basicff->checkPathAgainstMounts($this->target.'/');
                if (!$this->target || !$key)    {
-                       t3lib_BEfunc::typo3PrintError ('Parameter Error','Target was not a directory!','');
+                       t3lib_BEfunc::typo3PrintError ($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), '');
                        exit;
                }
 
index 1c4ac06..06268ee 100755 (executable)
@@ -105,6 +105,7 @@ class SC_file_rename {
         * @return      void
         */
        function init() {
+               //TODO remove global
                global $LANG,$BACK_PATH,$TYPO3_CONF_VARS;
 
                        // Initialize GPvars:
@@ -123,7 +124,7 @@ class SC_file_rename {
                }
                $key=$this->basicff->checkPathAgainstMounts($this->target.'/');
                if (!$this->target || !$key)    {
-                       t3lib_BEfunc::typo3PrintError ('Parameter Error','Target was not a directory!','');
+                       t3lib_BEfunc::typo3PrintError ($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), '');
                        exit;
                }
 
@@ -159,6 +160,8 @@ class SC_file_rename {
         * @return      void
         */
        function main() {
+               //TODO remove global, change $LANG into $GLOBALS['LANG'], change locallang*.php to locallang*.xml
+
                global $LANG;
 
                        // Make page header:
index 68b48d2..43f5ff4 100755 (executable)
@@ -145,7 +145,7 @@ class SC_file_upload {
                $this->target = $this->basicff->is_directory($this->target);
                $key=$this->basicff->checkPathAgainstMounts($this->target.'/');
                if (!$this->target || !$key)    {
-                       t3lib_BEfunc::typo3PrintError ('Parameter Error','Target was not a directory!','');
+                       t3lib_BEfunc::typo3PrintError ($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:paramError', true), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_file_list.xml:targetNoDir', true), '');
                        exit;
                }
 
@@ -230,7 +230,7 @@ class SC_file_upload {
                        // Make checkbox for "overwrite"
                $code.='
                        <div id="c-override">
-                               <input type="checkbox" name="overwriteExistingFiles" id="overwriteExistingFiles" value="1" /> <label for="overwriteExistingFiles">'.$LANG->getLL('overwriteExistingFiles',1).'</label>
+                               <input type="checkbox" class="checkbox" name="overwriteExistingFiles" id="overwriteExistingFiles" value="1" /> <label for="overwriteExistingFiles">'.$LANG->getLL('overwriteExistingFiles',1).'</label>
                        </div>
                        ';
 
@@ -303,4 +303,4 @@ $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>
index a5a9140..c30f4d4 100755 (executable)
@@ -28,6 +28,8 @@
                        <label index="mlang_labels_tabdescr">This is the file administration system in TYPO3. It allows you to access the file mounts of your login. Through this module you can upload, copy, move an delete files on the server.</label>
                        <label index="mlang_tabs_tab">Filelist</label>
                        <label index="write">W</label>
+                       <label index="paramError">Parameter Error:</label>
+                       <label index="targetNoDir">Target was not a directory!</label>
                </languageKey>
        </data>
-</T3locallang>
\ No newline at end of file
+</T3locallang>