Follow-up to #10327: [felogin] redirecting to referer does not work
[Packages/TYPO3.CMS.git] / typo3 / move_el.php
old mode 100755 (executable)
new mode 100644 (file)
index d2bdda4..61a2849
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -72,11 +72,6 @@ require('template.php');
        // Include local language labels:
 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
 
-       // Include libraries:
-require_once(PATH_t3lib.'class.t3lib_page.php');
-require_once(PATH_t3lib.'class.t3lib_positionmap.php');
-require_once(PATH_t3lib.'class.t3lib_pagetree.php');
-
 
 
 
@@ -270,7 +265,6 @@ class SC_move_el {
 
                        // Starting the document template object:
                $this->doc = t3lib_div::makeInstance('template');
-               $this->doc->docType= 'xhtml_trans';
                $this->doc->backPath = $BACK_PATH;
                $this->doc->setModuleTemplate('templates/move_el.html');
                $this->doc->JScode='';
@@ -400,12 +394,12 @@ class SC_move_el {
                                // Add the $code content as a new section to the module:
                        $this->content.=$this->doc->section($LANG->getLL('selectPositionOfElement').':',$code,0,1);
                }
-               
+
                        // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
-               $markers['CSH'] = $docHeaderButtons['csh'];     
+               $markers['CSH'] = $docHeaderButtons['csh'];
                $markers['CONTENT'] = $this->content;
-               
+
                        // Build the <body> for the module
                $this->content = $this->doc->startPage($LANG->getLL('movingElement'));
                $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
@@ -421,58 +415,50 @@ class SC_move_el {
        function printContent() {
                echo $this->content;
        }
-       
+
        /**
         * Create the panel of buttons for submitting the form or otherwise perform operations.
         *
         * @return      array   all available buttons as an assoc. array
         */
-       private function getButtons()   {
+       protected function getButtons() {
                global $LANG, $BACK_PATH;
-               
+
                $buttons = array(
                        'csh' => '',
-                       'back' => ''                    
+                       'back' => ''
                );
-                       
+
                if ($this->page_id)     {
                        if ((string)$this->table == 'pages') {
                                        // CSH
-                               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '');
+                               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_pages', $GLOBALS['BACK_PATH'], '', TRUE);
                        } elseif((string)$this->table == 'tt_content') {
                                        // CSH
-                               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '');
+                               $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'move_el_cs', $GLOBALS['BACK_PATH'], '', TRUE);
                        }
-                       
+
                        if ($this->R_URI) {
                                        // Back
                                $buttons['back'] ='<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack"><img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/goback.gif') . ' alt="" title="' . $LANG->getLL('goBack', 1) .'" /></a>';
                        }
                }
-               
+
                return $buttons;
        }
 }
 
-// Include extension?
+
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/move_el.php'])      {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/move_el.php']);
 }
 
 
 
-
-
-
-
-
-
-
-
-
 // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_move_el');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
-?>
+
+?>
\ No newline at end of file