aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-09-09 04:04:36 +0300
committerValentin Popov <info@valentineus.link>2018-09-09 04:04:36 +0300
commit16305051a960bf8322b2c1efda3de83481c91945 (patch)
tree35ebfea74664b8a0cc76d45e4384e48e582833b4
parent5d942ccbb23b2688c13c5490362d7bcab6ca516c (diff)
downloadlocal_webhooks-16305051a960bf8322b2c1efda3de83481c91945.tar.xz
local_webhooks-16305051a960bf8322b2c1efda3de83481c91945.zip
TODO and function type change
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--lib.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib.php b/lib.php
index 3f0865c..5b8b10d 100644
--- a/lib.php
+++ b/lib.php
@@ -163,6 +163,7 @@ class local_webhooks_api {
print_error( "unknowparamtype", "error", null, "service" );
}
+ // TODO: Add transactions for operations
$result = $DB->update_record( LW_TABLE_SERVICES, $service, false );
$DB->delete_records( LW_TABLE_EVENTS, array( "serviceid" => $service[ "id" ] ) );
if ( $result && is_array( $service[ "events" ] ) && !empty( $service[ "events" ] ) ) {
@@ -180,7 +181,7 @@ class local_webhooks_api {
* @param array $events
* @param int $serviceId
*/
- private static function insert_events( $events = array(), $serviceId = 0 ) {
+ protected static function insert_events( $events = array(), $serviceId = 0 ) {
global $DB;
$conditions = array();