New parameters of function 'local_webhooks_get_list_records' have been added

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-03-12 14:28:51 +04:00
parent e0a43273a3
commit 422cbfd57d
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

View File

@ -96,12 +96,14 @@ function local_webhooks_get_record($serviceid) {
* *
* @param number $limitfrom * @param number $limitfrom
* @param number $limitnum * @param number $limitnum
* @param array $conditions
* @param string $sort
* @return array * @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; 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) { foreach ($listrecords as $servicerecord) {
if (!empty($servicerecord->events)) { if (!empty($servicerecord->events)) {