* Added "config.doctype = none" support - omits any doctype in the frontend.
[Packages/TYPO3.CMS.git] / typo3 / wizard_add.php
index 6e6b8e0..5a4d9e0 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *  
-*  (c) 1999-2003 Kasper Skaarhoj (kasper@typo3.com)
+*  (c) 1999-2004 Kasper Skaarhoj (kasper@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is 
@@ -67,7 +67,7 @@ include ('sysext/lang/locallang_wizards.php');
 
 /**
  * Script Class for adding new items to a group/select field. Performs proper redirection as needed.
- * 
+ *
  * @author     Kasper Skaarhoj <kasper@typo3.com>
  * @package TYPO3
  * @subpackage core
@@ -98,14 +98,14 @@ class SC_wizard_add {
 
        /**
         * Initialization of the class.
-        * 
-        * @return      void            
+        *
+        * @return      void
         */
        function init() {
 
                        // Init GPvars:
-               $this->P = t3lib_div::GPvar('P',1);
-               $this->returnEditConf = t3lib_div::GPvar('returnEditConf');
+               $this->P = t3lib_div::_GP('P');
+               $this->returnEditConf = t3lib_div::_GP('returnEditConf');
 
                        // Get this record
                $origRow = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']);
@@ -151,8 +151,8 @@ class SC_wizard_add {
        /**
         * Main function
         * Will issue a location-header, redirecting either BACK or to a new alt_doc.php instance...
-        * 
-        * @return      void            
+        *
+        * @return      void
         */
        function main() {
 
@@ -168,6 +168,7 @@ class SC_wizard_add {
                                        // If that record was found (should absolutely be...), then init TCEmain and set, prepend or append the record
                                if (is_array($current)) {
                                        $tce = t3lib_div::makeInstance('t3lib_TCEmain');
+                                       $tce->stripslashes_values=0;
                                        $data=array();
                                        $addEl = $this->table.'_'.$this->id;
                                        switch((string)$this->P['params']['setValue'])  {
@@ -187,7 +188,6 @@ class SC_wizard_add {
                                        
                                                // Submit the data:
                                        $tce->start($data,array());
-                                       $tce->stripslashes_values=0;
                                        $tce->process_datamap();
                                }
                        }