From d83f370fb4f7740eaece8ef19aed1cacffadc989 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 3 Sep 2017 14:25:55 +0200 Subject: [PATCH] Page/Maintenance * send appropriate status code: 503 (temporarily unavailable) thx @Magnifikator for the heads up --- pages/genericPage.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pages/genericPage.class.php b/pages/genericPage.class.php index 412fcdeb..423d3129 100644 --- a/pages/genericPage.class.php +++ b/pages/genericPage.class.php @@ -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(); }