1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-03 23:37:39 +02:00

[ticket/12358] Correctly check and change the redirect url for ajax requests

PHPBB3-12358
This commit is contained in:
Joas Schilling
2014-04-07 00:06:55 +02:00
parent f0176b5393
commit 60be4c70a7

View File

@@ -2437,19 +2437,19 @@ function meta_refresh($time, $url, $disable_cd_check = false)
{ {
global $template, $refresh_data, $request; global $template, $refresh_data, $request;
$url = redirect($url, true, $disable_cd_check);
if ($request->is_ajax()) if ($request->is_ajax())
{ {
$refresh_data = array( $refresh_data = array(
'time' => $time, 'time' => $time,
'url' => str_replace('&', '&', $url) 'url' => $url,
); );
} }
else else
{ {
$url = redirect($url, true, $disable_cd_check); // For XHTML compatibility we change back & to &
$url = str_replace('&', '&', $url); $url = str_replace('&', '&', $url);
// For XHTML compatibility we change back & to &
$template->assign_vars(array( $template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />') 'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />')
); );