MDL-62889 message_popup: redirect using moodle_url
authorMark Nelson <markn@moodle.com>
Wed, 11 Jul 2018 05:26:11 +0000 (13:26 +0800)
committerMark Nelson <markn@moodle.com>
Tue, 17 Jul 2018 03:54:52 +0000 (11:54 +0800)
Without this relative URLs passed (like /message/index.php)
were being redirected to HOST/message/index.php rather than
$CFG->wwwroot/message/index.php.

message/output/popup/mark_notification_read.php

index f2dd609..0458678 100644 (file)
@@ -45,4 +45,4 @@ if ($USER->id != $notification->useridto) {
 }
 
 \core_message\api::mark_notification_as_read($notification);
-redirect($redirecturl);
+redirect(new moodle_url($redirecturl));