1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-12 09:44:38 +02:00

Various minor updates

This commit is contained in:
Ryan Cramer
2019-12-03 08:40:08 -05:00
parent fd89b7cebd
commit 346218a524
5 changed files with 30 additions and 9 deletions

View File

@@ -440,7 +440,7 @@ class Session extends Wire implements \IteratorAggregate {
*
*/
public function get($key, $_key = null) {
if($key == 'CSRF') {
if($key === 'CSRF') {
return $this->CSRF();
} else if(!is_null($_key)) {
// namespace
@@ -1151,7 +1151,8 @@ class Session extends Wire implements \IteratorAggregate {
if(!strpos($url, 'modal=')) $url .= (strpos($url, '?') !== false ? '&' : '?') . 'modal=1';
}
}
$this->wire()->setStatus(ProcessWire::statusFinished);
$statusData = array('redirectUrl' => $url, 'redirectType' => ($http301 ? 301 : 302));
$this->wire()->setStatus(ProcessWire::statusFinished, $statusData);
if($http301) header("HTTP/1.1 301 Moved Permanently");
header("Location: $url");
exit(0);