mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 17:59:22 +02:00
Avoid ERR_TOO_MANY_REDIRECTS on template change
This commit is contained in:
parent
1087aefe0a
commit
523afccb51
@ -25,7 +25,13 @@ if($config['template_allow_change'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
setSession('template', $template_name);
|
setSession('template', $template_name);
|
||||||
header('Location:' . getSession('last_uri'));
|
|
||||||
|
$newLocation = $lastUri = getSession('last_uri');
|
||||||
|
if($lastUri === $_SERVER['REQUEST_URI']) { // avoid ERR_TOO_MANY_REDIRECTS error in browsers
|
||||||
|
$newLocation = SERVER_URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
header('Location:' . $newLocation);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user