1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-27 21:45:22 +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;
$url = redirect($url, true, $disable_cd_check);
if ($request->is_ajax())
{
$refresh_data = array(
'time' => $time,
'url' => str_replace('&', '&', $url)
'url' => $url,
);
}
else
{
$url = redirect($url, true, $disable_cd_check);
// For XHTML compatibility we change back & to &
$url = str_replace('&', '&', $url);
// For XHTML compatibility we change back & to &
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />')
);