aboutsummaryrefslogtreecommitdiff
path: root/lib.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-03-12 00:44:01 +0300
committerValentin Popov <info@valentineus.link>2018-03-12 00:44:01 +0300
commitd29ee546a29f58c15024a25b68959fd4444a0148 (patch)
treeacc5939e3ccb7f59d0b51d47f45d1d21afdee571 /lib.php
parent27fe9e412b8135638c9298e38e6fcca3094cc53e (diff)
downloadlocal_webhooks-d29ee546a29f58c15024a25b68959fd4444a0148.tar.xz
local_webhooks-d29ee546a29f58c15024a25b68959fd4444a0148.zip
Renaming a variable
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'lib.php')
-rw-r--r--lib.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib.php b/lib.php
index fb2325c..12d95f2 100644
--- a/lib.php
+++ b/lib.php
@@ -246,23 +246,23 @@ function local_webhooks_restore_backup($data, $deleterecords = false) {
* Send the event remotely to the service.
*
* @param array $event
- * @param object $callback
+ * @param object $record
* @return array
*/
-function local_webhooks_send_request($event, $callback) {
+function local_webhooks_send_request($event, $record) {
global $CFG;
$event["host"] = parse_url($CFG->wwwroot)["host"];
- $event["token"] = $callback->token;
- $event["extra"] = $callback->other;
+ $event["token"] = $record->token;
+ $event["extra"] = $record->other;
$curl = new curl();
- $curl->setHeader(array("Content-Type: application/" . $callback->type));
- $curl->post($callback->url, json_encode($event));
+ $curl->setHeader(array("Content-Type: application/" . $record->type));
+ $curl->post($record->url, json_encode($event));
$response = $curl->getResponse();
/* Event notification */
- local_webhooks_events::response_answer($callback->id, $response);
+ local_webhooks_events::response_answer($record->id, $response);
return $response;
} \ No newline at end of file