From 32e44ea86caf493435f36d429827e71943db4ca2 Mon Sep 17 00:00:00 2001 From: Daniel Thee Roperto Date: Wed, 9 Nov 2016 11:00:08 +1100 Subject: [PATCH] Issue #22 - Added debug parameter to preview rendered page. --- maintenance.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maintenance.php b/maintenance.php index cacdcd2..6db5925 100644 --- a/maintenance.php +++ b/maintenance.php @@ -53,3 +53,12 @@ if (isset($_GET['file'])) { readfile($file); return; } + +if (isset($_GET['debug'])) { + // Use auth/outage/maintenance.php?debug to preview how it will render without triggering maintenance mode. + require_once(__DIR__.'/../../config.php'); + $outage = outagedb::get_next_starting(); + maintenance_static_page::create_from_outage($outage); + readfile(maintenance_static_page::get_template_file()); + return; +} \ No newline at end of file