/***************************************************************
* Copyright notice
*
-* (c) 1999-2004 Kasper Skaarhoj (kasper@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
* $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]
$BACK_PATH='';
require ('init.php');
require ('template.php');
-include ('sysext/lang/locallang_wizards.php');
-require_once (PATH_t3lib.'class.t3lib_loaddbgroup.php');
-
-
-
-
-
-
-
-
-
-
+$LANG->includeLLFile('EXT:lang/locallang_wizards.xml');
/**
* 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
*/
$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:
- header('Location: '.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode('wizard_edit.php?doClose=1').'&edit['.$fTable.']['.$this->P['currentValue'].']=edit'));
+ if (is_array($config) && $config['type']=='select' && !$config['MM'] && $config['maxitems']<=1 && t3lib_div::testInt($this->P['currentValue']) && $this->P['currentValue'] && $fTable) { // SINGLE value:
+ $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:
}
// 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();
}
}
}
-// 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