* Fixed bug #6961: Errors in link creation popup window
[Packages/TYPO3.CMS.git] / typo3 / wizard_edit.php
index e7616fb..083d5c3 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
@@ -30,7 +30,7 @@
  * $Id$
  * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  */
 /**
  * [CLASS/FUNCTION INDEX of SCRIPT]
@@ -52,7 +52,7 @@
 $BACK_PATH='';
 require ('init.php');
 require ('template.php');
-include ('sysext/lang/locallang_wizards.php');
+$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
 require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
 
 
@@ -69,7 +69,7 @@ require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
 /**
  * Script Class for redirecting a backend user to the editing form when an "Edit wizard" link was clicked in TCEforms somewhere
  *
- * @author     Kasper Skaarhoj <kasper@typo3.com>
+ * @author     Kasper Skaarhoj <kasperYYYY@typo3.com>
  * @package TYPO3
  * @subpackage core
  */
@@ -113,7 +113,7 @@ class SC_wizard_edit {
                        $fTable = $this->P['currentValue']<0 ? $config['neg_foreign_table'] : $config['foreign_table'];
 
                                // Detecting the various allowed field type setups and acting accordingly.
-                       if (is_array($config) && $config['type']=='select' && !$config['MM'] && t3lib_div::testInt($this->P['currentValue']) && $this->P['currentValue'] && $fTable)    {       // SINGLE value:
+                       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'));
                        } elseif (is_array($config) && $this->P['currentSelectedValues'] && (($config['type']=='select' && $config['foreign_table']) || ($config['type']=='group' && $config['internal_type']=='db')))  {       // MULTIPLE VALUES: