aboutsummaryrefslogtreecommitdiff
path: root/lib.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib.php')
-rw-r--r--lib.php6
1 files changed, 4 insertions, 2 deletions
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)) {