1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 07:35:29 +02:00

Merge remote-tracking branch 'github-nickvergessen/ticket/12358' into develop-ascraeus

* github-nickvergessen/ticket/12358:
  [ticket/12358] Correctly check and change the redirect url for ajax requests
This commit is contained in:
Nils Adermann 2014-04-07 14:20:39 -04:00
commit 2efa0c2f8e

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 . '" />')
); );