From 422cbfd57d1f411cde77051e9daa96ea9cafe742 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 12 Mar 2018 14:28:51 +0400 Subject: New parameters of function 'local_webhooks_get_list_records' have been added Signed-off-by: Valentin Popov --- lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib.php') diff --git a/lib.php b/lib.php index 0125073..e2e5d88 100644 --- a/lib.php +++ b/lib.php @@ -96,12 +96,14 @@ function local_webhooks_get_record($serviceid) { * * @param number $limitfrom * @param number $limitnum + * @param array $conditions + * @param string $sort * @return array */ -function local_webhooks_get_list_records($limitfrom = 0, $limitnum = 0) { +function local_webhooks_get_list_records($limitfrom = 0, $limitnum = 0, $conditions = array(), $sort = "id") { global $DB; - $listrecords = $DB->get_records(LOCAL_WEBHOOKS_NAME_TABLE, null, "id", "*", $limitfrom, $limitnum); + $listrecords = $DB->get_records(LOCAL_WEBHOOKS_NAME_TABLE, $conditions, $sort, "*", $limitfrom, $limitnum); foreach ($listrecords as $servicerecord) { if (!empty($servicerecord->events)) { -- cgit v1.2.3