diff options
author | Valentin Popov <info@valentineus.link> | 2018-03-12 22:23:57 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-03-12 22:23:57 +0300 |
commit | adb9a1e69c0badcd564e47271ae877c971c84bb2 (patch) | |
tree | 6ceace5ddadf6ecab832f3ba8a2836dd15729269 | |
parent | 2c013b323080c568f8aa736c62cd8e6bba0d10a1 (diff) | |
download | local_webhooks-adb9a1e69c0badcd564e47271ae877c971c84bb2.tar.xz local_webhooks-adb9a1e69c0badcd564e47271ae877c971c84bb2.zip |
Added internal function 'local_webhooks_delete_events'
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | locallib.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/locallib.php b/locallib.php index 6ad80b6..d02898b 100644 --- a/locallib.php +++ b/locallib.php @@ -72,6 +72,16 @@ function local_webhooks_cache_reset() { } /** + * Deleting all the events linked to the given service. + * + * @param number $serviceid + */ +function local_webhooks_delete_events($serviceid) { + global $DB; + $DB->delete_records(LOCAL_WEBHOOKS_TABLE_EVENTS, array("serviceid" => $serviceid)); +} + +/** * Data serialization. * * @param array|object $data |