get flash from GET as early as possible

This commit is contained in:
Shish 2019-12-16 00:06:04 +00:00
parent 5d559dc654
commit 678b25d92b

View file

@ -67,6 +67,14 @@ class Page
$this->type = $type;
}
public function __construct()
{
if (@$_GET["flash"]) {
$this->flash[] = $_GET['flash'];
unset($_GET["flash"]);
}
}
//@}
// ==============================================
@ -271,10 +279,6 @@ class Page
{
global $page, $user;
if (@$_GET["flash"]) {
$this->flash[] = $_GET['flash'];
}
header("HTTP/1.0 {$this->code} Shimmie");
header("Content-type: " . $this->type);
header("X-Powered-By: SCore-" . SCORE_VERSION);