diff options
author | Valentin Popov <info@valentineus.link> | 2018-09-09 03:28:51 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-09-09 03:29:38 +0300 |
commit | 270c04a603ffba79fd8c916b1b548c987b780682 (patch) | |
tree | b51333f0ed09ed77949569c65ce26c3c345739d4 | |
parent | 2194bc4a019fcc1de191c76ab8a905b04b029292 (diff) | |
download | local_webhooks-270c04a603ffba79fd8c916b1b548c987b780682.tar.xz local_webhooks-270c04a603ffba79fd8c916b1b548c987b780682.zip |
Minor fixes to the function 'get_services'
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r-- | lib.php | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -63,18 +63,17 @@ class local_webhooks_api { * Get a list of services. * By default, the entire list of services is given. * - * @param array $conditions - * @param string $sort - * @param int $limitFrom - * @param int $limitNum + * @param array $conditions + * @param int $limitFrom + * @param int $limitNum * @return array */ - public static function get_services( $conditions = array(), $sort = "", $limitFrom = 0, $limitNum = 0 ) { + public static function get_services( $conditions = array(), $limitFrom = 0, $limitNum = 0 ) { global $DB; - $services = $DB->get_records( LW_TABLE_SERVICES, $conditions, $sort, "*", $limitFrom, $limitNum ); + $services = $DB->get_records( LW_TABLE_SERVICES, $conditions, "", "*", $limitFrom, $limitNum ); - foreach ( $services as $key => $service ) { + foreach ( $services as $service ) { $events = $DB->get_records( LW_TABLE_EVENTS, array( "serviceid" => $service->id ), "", "*", 0, 0 ); $service->events = array(); |