aboutsummaryrefslogtreecommitdiff
path: root/locallib.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-03-12 22:23:57 +0300
committerValentin Popov <info@valentineus.link>2018-03-12 22:23:57 +0300
commitadb9a1e69c0badcd564e47271ae877c971c84bb2 (patch)
tree6ceace5ddadf6ecab832f3ba8a2836dd15729269 /locallib.php
parent2c013b323080c568f8aa736c62cd8e6bba0d10a1 (diff)
downloadlocal_webhooks-adb9a1e69c0badcd564e47271ae877c971c84bb2.tar.xz
local_webhooks-adb9a1e69c0badcd564e47271ae877c971c84bb2.zip
Added internal function 'local_webhooks_delete_events'
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'locallib.php')
-rw-r--r--locallib.php10
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