* Fixed issue 7052: Permission problem of RTE images
[Packages/TYPO3.CMS.git] / typo3 / file_edit.php
index 96d7156..3f7478d 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -31,7 +31,7 @@
  * Revised for TYPO3 3.6 2/2003 by Kasper Skaarhoj
  * XHTML compliant (except textarea field)
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
@@ -39,9 +39,9 @@
  *
  *
  *   74: class SC_file_edit
- *   92:     function init()
- *  141:     function main()
- *  201:     function printContent()
+ *   93:     function init()
+ *  143:     function main()
+ *  205:     function printContent()
  *
  * TOTAL FUNCTIONS: 3
  * (This index is automatically created/updated by the extension "extdeveval")
@@ -67,17 +67,29 @@ require_once(PATH_t3lib.'class.t3lib_basicfilefunc.php');
 /**
  * Script Class for rendering the file editing screen
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  */
 class SC_file_edit {
        var $content;           // Module content accumulated.
-       var $basicff;           // File processing object loaded here.
+
+       /**
+        * File processing object
+        *
+        * @var t3lib_basicFileFunctions
+        */
+       var $basicff;
        var $shortPath;
        var $title;
        var $icon;
-       var $doc;                       // Document template object
+
+       /**
+        * Document template object
+        *
+        * @var template
+        */
+       var $doc;
 
                // Internal, static: GPvar
        var $origTarget;                // Original input target
@@ -172,13 +184,16 @@ class SC_file_edit {
                                // Edit textarea:
                        $code.='
                                <div id="c-edit">
-                                       <textarea rows="30" name="file[editfile][0][data]" wrap="off"'.$this->doc->formWidthText(48,'width:98%;height:80%','off').'>'.
+                                       <textarea rows="30" name="file[editfile][0][data]" wrap="off"'.$this->doc->formWidthText(48,'width:98%;height:80%','off').' class="fixed-font enable-tab">'.
                                        t3lib_div::formatForTextarea($fileContent).
                                        '</textarea>
                                        <input type="hidden" name="file[editfile][0][target]" value="'.$this->target.'" />
                                </div>
                                <br />';
 
+                               // CSH:
+                       $code.= t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'file_edit', $GLOBALS['BACK_PATH'],'|<br/>');
+
                                // Make shortcut:
                        if ($BE_USER->mayMakeShortcut())        {
                                $this->MCONF['name']='xMOD_file_edit.php';
@@ -192,7 +207,6 @@ class SC_file_edit {
                $this->content.= $this->doc->sectionEnd();
                $this->content.=$code;
 
-               $this->content.=$this->doc->endPage();
        }
 
        /**
@@ -201,6 +215,8 @@ class SC_file_edit {
         * @return      void
         */
        function printContent() {
+               $this->content.= $this->doc->endPage();
+               $this->content = $this->doc->insertStylesAndJS($this->content);
                echo $this->content;
        }
 }