Index: typo3/class.show_rechis.inc =================================================================== --- typo3/class.show_rechis.inc (Revision 5601) +++ typo3/class.show_rechis.inc (Arbeitskopie) @@ -95,8 +95,7 @@ $this->createChangeLog(); $completeDiff = $this->createMultipleDiff(); $this->performRollback($completeDiff); - Header ('Location: '.t3lib_div::locationHeaderUrl($this->returnUrl)); - exit; + t3lib_div::redirect($this->returnUrl); } // save snapshot Index: typo3/wizard_edit.php =================================================================== --- typo3/wizard_edit.php (Revision 5601) +++ typo3/wizard_edit.php (Arbeitskopie) @@ -103,7 +103,8 @@ // 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_div::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: @@ -123,7 +124,7 @@ } // Redirect to alt_doc.php: - header('Location: '.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode('wizard_edit.php?doClose=1').$params)); + t3lib_div::redirect('alt_doc.php?returnUrl=' . rawurlencode('wizard_edit.php?doClose=1') . $params); } else { $this->closeWindow(); } Index: typo3/class.db_list.inc =================================================================== --- typo3/class.db_list.inc (Revision 5601) +++ typo3/class.db_list.inc (Arbeitskopie) @@ -799,8 +799,7 @@ $returnUrl = '&returnUrl='.rawurlencode($this->listURL()); $location = $GLOBALS['BACK_PATH'].'alt_doc.php?'.$params.$returnUrl; - header('Location: '.t3lib_div::locationHeaderUrl($location)); - exit; + t3lib_div::redirect($location); } } } Index: typo3/index.php =================================================================== --- typo3/index.php (Revision 5601) +++ typo3/index.php (Arbeitskopie) @@ -379,8 +379,7 @@ // If there is a redirect URL AND if loginRefresh is not set... if (!$this->loginRefresh) { - header('Location: '.t3lib_div::locationHeaderUrl($this->redirectToURL)); - exit; + t3lib_div::redirect($this->redirectToURL); } else { $TBE_TEMPLATE->JScode.=$TBE_TEMPLATE->wrapScriptTags(' if (parent.opener && parent.opener.busy) { Index: typo3/classes/class.typo3_tcefile.php =================================================================== --- typo3/classes/class.typo3_tcefile.php (Revision 5601) +++ typo3/classes/class.typo3_tcefile.php (Arbeitskopie) @@ -147,7 +147,7 @@ $this->fileProcessor->printLogErrorMessages($this->redirect); t3lib_BEfunc::getSetUpdateSignal('updateFolderTree'); if ($this->redirect) { - header('Location: ' . t3lib_div::locationHeaderUrl($this->redirect)); + t3lib_div::redirect($this->redirect); } } Index: typo3/tce_db.php =================================================================== --- typo3/tce_db.php (Revision 5601) +++ typo3/tce_db.php (Arbeitskopie) @@ -227,7 +227,7 @@ } if ($this->redirect && !$this->tce->debug) { - Header('Location: '.t3lib_div::locationHeaderUrl($this->redirect)); + t3lib_div::redirect($this->redirect); } } } Index: typo3/wizard_list.php =================================================================== --- typo3/wizard_list.php (Revision 5601) +++ typo3/wizard_list.php (Arbeitskopie) @@ -117,10 +117,11 @@ // Make redirect: if (!strcmp($this->pid,'') || strcmp($this->id,'')) { // If pid is blank OR if id is set, then return... - header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl'])); + $redirectUrl = $this->P['returnUrl']; } else { // Otherwise, show the list: - header('Location: '.t3lib_div::locationHeaderUrl('db_list.php?id='.$this->pid.'&table='.$this->P['params']['table'].'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')))); + $redirectUrl = 'db_list.php?id=' . $this->pid . '&table=' . $this->P['params']['table'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')); } + t3lib_div::redirect($redirectUrl); } } Index: typo3/alt_doc.php =================================================================== --- typo3/alt_doc.php (Revision 5601) +++ typo3/alt_doc.php (Arbeitskopie) @@ -1157,8 +1157,7 @@ $returnUrl = '&returnUrl='.rawurlencode(t3lib_div::_GP('returnUrl')); $location = $GLOBALS['BACK_PATH'].'alt_doc.php?'.$params.$returnUrl; - header('Location: '.t3lib_div::locationHeaderUrl($location)); - exit; + t3lib_div::redirect($location); } } } @@ -1408,8 +1407,7 @@ // If code is NOT set OR set to 1, then make a header location redirect to $this->retUrl if (!$code || $code==1) { - Header('Location: '.t3lib_div::locationHeaderUrl($this->retUrl)); - exit; + t3lib_div::redirect($this->retUrl); } else { $this->setDocument('',$this->retUrl); } @@ -1438,8 +1436,7 @@ $retUrl = $sParts['path'].'?'.$setupArr[2].'&returnUrl='.rawurlencode($retUrl); } } - Header('Location: '.t3lib_div::locationHeaderUrl($retUrl)); - exit; + t3lib_div::redirect($retUrl); } } Index: typo3/wizard_forms.php =================================================================== --- typo3/wizard_forms.php (Revision 5601) +++ typo3/wizard_forms.php (Arbeitskopie) @@ -400,9 +400,8 @@ $row = t3lib_BEfunc::getRecord($this->P['table'],$this->P['uid']); // If the save/close button was pressed, then redirect the screen: - if ($_POST['saveandclosedok_x']) { - header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl'])); - exit; + if ($_POST['saveandclosedok_x']) { + t3lib_div::redirect($this->P['returnUrl']); } } } else { // If nothing has been submitted, load the $bodyText variable from the selected database row: Index: typo3/wizard_table.php =================================================================== --- typo3/wizard_table.php (Revision 5601) +++ typo3/wizard_table.php (Arbeitskopie) @@ -318,9 +318,8 @@ $tce->process_datamap(); // If the save/close button was pressed, then redirect the screen: - if ($_POST['saveandclosedok_x']) { - header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl'])); - exit; + if ($_POST['saveandclosedok_x']) { + t3lib_div::redirect($this->P['returnUrl']); } } } else { // If nothing has been submitted, load the $bodyText variable from the selected database row: Index: typo3/wizard_add.php =================================================================== --- typo3/wizard_add.php (Revision 5601) +++ typo3/wizard_add.php (Arbeitskopie) @@ -122,8 +122,7 @@ // Return if new record as parent (not possibly/allowed) if (!strcmp($this->pid,'')) { - header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl'])); - exit; + t3lib_div::redirect($this->P['returnUrl']); } // Else proceed: @@ -215,10 +214,12 @@ } } // Return to the parent alt_doc.php record editing session: - header('Location: '.t3lib_div::locationHeaderUrl($this->P['returnUrl'])); + t3lib_div::redirect($this->P['returnUrl']); } else { - // Redirecting to alt_doc.php with instructions to create a new record AND when closing to return back with information about that records ID etc. - header('Location: '.t3lib_div::locationHeaderUrl('alt_doc.php?returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')).'&returnEditConf=1&edit['.$this->P['params']['table'].']['.$this->pid.']=new')); + // Redirecting to alt_doc.php with instructions to create a new record + // AND when closing to return back with information about that records ID etc. + $redirectUrl = 'alt_doc.php?returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI')) . '&returnEditConf=1&edit[' . $this->P['params']['table'] . '][' . $this->pid . ']=new'; + t3lib_div::redirect($redirectUrl); } } } Index: typo3/logout.php =================================================================== --- typo3/logout.php (Revision 5601) +++ typo3/logout.php (Arbeitskopie) @@ -72,7 +72,8 @@ $BE_USER->writelog(255,2,0,1,'User %s logged out from TYPO3 Backend',Array($BE_USER->user['username'])); // Logout written to log $BE_USER->logoff(); - header('Location: '.t3lib_div::locationHeaderUrl(t3lib_div::_GP('redirect')?t3lib_div::_GP('redirect'):'index.php')); + $redirectUrl = (t3lib_div::_GP('redirect') ? t3lib_div::_GP('redirect') : 'index.php'); + t3lib_div::redirect($redirectUrl); } } Index: typo3/mod/tools/em/class.em_index.php =================================================================== --- typo3/mod/tools/em/class.em_index.php (Revision 5601) +++ typo3/mod/tools/em/class.em_index.php (Arbeitskopie) @@ -2302,7 +2302,7 @@ $this->content.= $this->doc->section('Import/Install Extensions:',$content,0,1); } else { - header('Location: '.t3lib_div::locationHeaderUrl($returnUrl)); + t3lib_div::redirect($returnUrl); } } Index: typo3/mod/user/ws/workspaceforms.php =================================================================== --- typo3/mod/user/ws/workspaceforms.php (Revision 5601) +++ typo3/mod/user/ws/workspaceforms.php (Arbeitskopie) @@ -193,8 +193,7 @@ // if 'Save&Close' was pressed, redirect to main module script if (t3lib_div::_GP('_saveandclosedok_x')) { // `n` below is to prevent caching - header('Location: ' . t3lib_div::locationHeaderUrl('index.php?n=' . uniqid(''))); - exit(); + t3lib_div::redirect('index.php?n=' . uniqid('')); } } Index: typo3/index_re.php =================================================================== --- typo3/index_re.php (Revision 5601) +++ typo3/index_re.php (Arbeitskopie) @@ -42,5 +42,5 @@ define('TYPO3_PROCEED_IF_NO_USER', 1); require ('init.php'); -header('Location: '.t3lib_div::locationHeaderUrl(t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').'index.php')); +t3lib_div::redirect(t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR') . 'index.php')); ?> \ No newline at end of file Index: typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php =================================================================== --- typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (Revision 5601) +++ typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (Arbeitskopie) @@ -121,8 +121,7 @@ if (!$GLOBALS['TSFE']->fe_user->cookieId) { $content .= '
' . $this->pi_getLL('cookie_warning', '', 1) . '
'; } else { - header('Location: '.t3lib_div::locationHeaderUrl($this->redirectUrl)); - exit; + t3lib_div::redirect($this->redirectUrl); } } return $this->conf['wrapContentInBaseClass'] ? $this->pi_wrapInBaseClass($content) : $content; Index: typo3/sysext/beuser/mod/index.php =================================================================== --- typo3/sysext/beuser/mod/index.php (Revision 5601) +++ typo3/sysext/beuser/mod/index.php (Arbeitskopie) @@ -1525,8 +1525,8 @@ } $GLOBALS['TYPO3_DB']->exec_UPDATEquery('be_sessions', 'ses_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['BE_USER']->id, 'be_sessions').' AND ses_name=\'be_typo_user\' AND ses_userid='.intval($GLOBALS['BE_USER']->user['uid']),$updateData); - header('Location: '.t3lib_div::locationHeaderUrl($GLOBALS['BACK_PATH'].'index.php'.($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']?'':'?commandLI=1'))); - exit; + $redirectUrl = $GLOBALS['BACK_PATH'] . 'index.php' . ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] ? '' : '?commandLI=1'); + t3lib_div::redirect($redirectUrl); } } Index: typo3/sysext/beuser/class.tx_beuser_switchbackuser.php =================================================================== --- typo3/sysext/beuser/class.tx_beuser_switchbackuser.php (Revision 5601) +++ typo3/sysext/beuser/class.tx_beuser_switchbackuser.php (Arbeitskopie) @@ -37,9 +37,8 @@ ); $GLOBALS['TYPO3_DB']->exec_UPDATEquery('be_sessions', 'ses_id='.$GLOBALS['TYPO3_DB']->fullQuoteStr($GLOBALS['BE_USER']->id, 'be_sessions').' AND ses_name=\'be_typo_user\' AND ses_userid='.intval($GLOBALS['BE_USER']->user['uid']),$updateData); - header('Location: '.t3lib_div::locationHeaderUrl($GLOBALS['BACK_PATH'].'index.php'.($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']?'':'?commandLI=1'))); - exit; - //$GLOBALS['TYPO4 + $redirectUrl = $GLOBALS['BACK_PATH'] . 'index.php' . ($GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] ? '' : '?commandLI=1'); + t3lib_div::redirect($redirectUrl); } } } Index: typo3/sysext/simulatestatic/class.tx_simulatestatic.php =================================================================== --- typo3/sysext/simulatestatic/class.tx_simulatestatic.php (Revision 5601) +++ typo3/sysext/simulatestatic/class.tx_simulatestatic.php (Arbeitskopie) @@ -110,7 +110,7 @@ $parentObject->printError($message.'