aboutsummaryrefslogtreecommitdiff
path: root/lib.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-03-12 13:28:51 +0300
committerValentin Popov <info@valentineus.link>2018-03-12 13:38:33 +0300
commit422cbfd57d1f411cde77051e9daa96ea9cafe742 (patch)
tree5200cedfcab3fce6824c08829b3f411d4324a272 /lib.php
parente0a43273a3b72d000623472208336cbb333b356a (diff)
downloadlocal_webhooks-422cbfd57d1f411cde77051e9daa96ea9cafe742.tar.xz
local_webhooks-422cbfd57d1f411cde77051e9daa96ea9cafe742.zip
New parameters of function 'local_webhooks_get_list_records' have been added
Signed-off-by: Valentin Popov <info@valentineus.link>
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)) {