mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Page/Maintenance
* send appropriate status code: 503 (temporarily unavailable) thx @Magnifikator for the heads up
This commit is contained in:
@@ -482,7 +482,8 @@ class GenericPage
|
||||
if (isset($this->tabId))
|
||||
$this->pageTemplate['activeTab'] = $this->tabId;
|
||||
|
||||
header("HTTP/1.0 404 Not Found", true, 404);
|
||||
header('HTTP/1.0 404 Not Found', true, 404);
|
||||
|
||||
$this->display('list-page-generic');
|
||||
exit();
|
||||
}
|
||||
@@ -500,13 +501,17 @@ class GenericPage
|
||||
|
||||
Util::arraySumByKey($this->mysql, DB::Aowow()->getStatistics(), DB::World()->getStatistics());
|
||||
|
||||
header("HTTP/1.0 404 Not Found", true, 404);
|
||||
header('HTTP/1.0 404 Not Found', true, 404);
|
||||
|
||||
$this->display('list-page-generic');
|
||||
exit();
|
||||
}
|
||||
|
||||
public function maintenance() // display brb gnomes
|
||||
{
|
||||
header('HTTP/1.0 503 Service Temporarily Unavailable', true, 503);
|
||||
header('Retry-After: '.(3 * HOURS));
|
||||
|
||||
$this->display('maintenance');
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user