From f28b408b1ed984a02afec895a8cea7b58455c24e Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 18 Nov 2017 07:34:38 +0400 Subject: Added hostname to the request --- classes/handler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/handler.php b/classes/handler.php index ac933a9..8e20db8 100644 --- a/classes/handler.php +++ b/classes/handler.php @@ -71,6 +71,8 @@ class handler { * @param object $callback */ private static function handler_callback($data, $callback) { + global $CFG; + if (boolval($callback->enable)) { $events = array(); if (!empty($callback->events)) { @@ -78,6 +80,9 @@ class handler { } if (!empty($events[$data["eventname"]])) { + $urlparse = parse_url($CFG->wwwroot); + $data["host"] = $urlparse['host']; + if (!empty($callback->token)) { $data["token"] = $callback->token; } -- cgit v1.2.3