Outage remodelled both in DB and PHP Class. Issue #17.

This commit is contained in:
Daniel Thee Roperto
2016-09-09 11:39:44 +10:00
parent 4e46e934d0
commit 6bb9320ef6
9 changed files with 115 additions and 58 deletions

View File

@@ -36,9 +36,7 @@ outagelib::pagesetup();
$mform = new \auth_outage\forms\outage\edit();
if ($mform->is_cancelled()) {
redirect('/auth/outage/manage.php');
} else if ($fromform = $mform->get_data()) {
$fromform = outagelib::parseformdata($fromform);
$outage = new outage($fromform);
} else if ($outage = $mform->get_data()) {
$id = outagedb::save($outage);
redirect('/auth/outage/manage.php#auth_outage_id_' . $id);
}