aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-03-12 23:18:28 +0300
committerValentin Popov <info@valentineus.link>2018-03-12 23:18:28 +0300
commit46b602226996a89f63d750e8b08e568680bf9d5d (patch)
tree3699d5d3a4f2ec322caf5b46d0a41fb64467c739
parent2bd5e80b10ffcb035063e0b2a6e9b08b4d9efd4f (diff)
downloadlocal_webhooks-46b602226996a89f63d750e8b08e568680bf9d5d.tar.xz
local_webhooks-46b602226996a89f63d750e8b08e568680bf9d5d.zip
Added variables
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--locallib.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/locallib.php b/locallib.php
index 890e705..afc917c 100644
--- a/locallib.php
+++ b/locallib.php
@@ -75,12 +75,14 @@ function local_webhooks_cache_reset() {
* Forms a list of events for the specified service.
*
* @param number $serviceid
+ * @param number $limitfrom
+ * @param number $limitnum
* @return array
*/
-function local_webhooks_get_list_events_for_service($serviceid) {
+function local_webhooks_get_list_events_for_service($serviceid, $limitfrom = 0, $limitnum = 0) {
global $DB;
- $rs = $DB->get_recordset(LOCAL_WEBHOOKS_TABLE_EVENTS, array("serviceid" => $serviceid), "id", "*", 0, 0);
+ $rs = $DB->get_recordset(LOCAL_WEBHOOKS_TABLE_EVENTS, array("serviceid" => $serviceid), "id", "*", $limitfrom, $limitnum);
$events = array();
foreach ($rs as $record) {