Issue #22 - Added debug parameter to preview rendered page.

This commit is contained in:
Daniel Thee Roperto
2016-11-09 11:00:08 +11:00
parent db85ea06cf
commit 32e44ea86c

View File

@@ -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;
}