diff options
author | Valentin Popov <info@valentineus.link> | 2017-12-21 10:30:16 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-12-21 10:31:58 +0300 |
commit | 95602678336cfefc4ffbded82fa103b2d89c5ae0 (patch) | |
tree | 3881175a495268c3bfc52427f4e677e9dfb1192d /editservice.php | |
parent | 2057a1efb67d6af8a72eba5e367c97289b07c85d (diff) | |
download | local_webhooks-95602678336cfefc4ffbded82fa103b2d89c5ae0.tar.xz local_webhooks-95602678336cfefc4ffbded82fa103b2d89c5ae0.zip |
Refactoring the editor code
Diffstat (limited to 'editservice.php')
-rw-r--r-- | editservice.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editservice.php b/editservice.php index 8a7d4f6..6e46e6f 100644 --- a/editservice.php +++ b/editservice.php @@ -59,12 +59,12 @@ if ($editing = boolval($serviceid)) { if ($data = $mform->get_data()) { if ($editing) { $data->id = $serviceid; - local_webhooks_update_record($data, false); - redirect($managerservice, new lang_string("eventwebserviceserviceupdated", "webservice")); + local_webhooks_update_record($data); } else { - local_webhooks_update_record($data, true); - redirect($managerservice, new lang_string("eventwebserviceservicecreated", "webservice")); + local_webhooks_create_record($data); } + + redirect($managerservice, new lang_string("changessaved", "moodle")); } /* The page title */ @@ -77,4 +77,5 @@ echo $OUTPUT->header(); /* Displays the form */ $mform->display(); +/* Footer */ echo $OUTPUT->footer();
\ No newline at end of file |