Fixed bug #7896: Hide the page browser if not enough entries are available (Thanks...
[Packages/TYPO3.CMS.git] / typo3 / wizard_edit.php
old mode 100755 (executable)
new mode 100644 (file)
index 083d5c3..5c6618e
@@ -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
@@ -53,17 +53,6 @@ $BACK_PATH='';
 require ('init.php');
 require ('template.php');
 $LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
-require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
-
-
-
-
-
-
-
-
-
-
 
 
 /**
@@ -114,7 +103,8 @@ class SC_wizard_edit {
 
                                // Detecting the various allowed field type setups and acting accordingly.
                        if (is_array($config) && $config['type']=='select' && !$config['MM'] && $config['maxitems']<=1 && t3lib_div::testInt($this->P['currentValue']) && $this->P['currentValue'] && $fTable)  {       // SINGLE value:
-                               header('Location: '.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode('wizard_edit.php?doClose=1').'&edit['.$fTable.']['.$this->P['currentValue'].']=edit'));
+                               $redirectUrl = 'alt_doc.php?returnUrl=' . rawurlencode('wizard_edit.php?doClose=1') . '&edit[' . $fTable . '][' . $this->P['currentValue'] . ']=edit';
+                               t3lib_utility_Http::redirect($redirectUrl);
                        } elseif (is_array($config) && $this->P['currentSelectedValues'] && (($config['type']=='select' && $config['foreign_table']) || ($config['type']=='group' && $config['internal_type']=='db')))  {       // MULTIPLE VALUES:
 
                                        // Init settings:
@@ -134,7 +124,7 @@ class SC_wizard_edit {
                                }
 
                                        // Redirect to alt_doc.php:
-                               header('Location: '.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode('wizard_edit.php?doClose=1').$params));
+                               t3lib_utility_Http::redirect('alt_doc.php?returnUrl=' . rawurlencode('wizard_edit.php?doClose=1') . $params);
                        } else {
                                $this->closeWindow();
                        }
@@ -152,24 +142,16 @@ class SC_wizard_edit {
        }
 }
 
-// Include extension?
+
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_edit.php'])  {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/wizard_edit.php']);
 }
 
 
 
-
-
-
-
-
-
-
-
-
 // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_wizard_edit');
 $SOBE->init();
 $SOBE->main();
+
 ?>
\ No newline at end of file