From c6b8b0a8279dce9a44d0582b86e33a22531b459d Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Thu, 1 May 2014 14:16:56 +0800 Subject: [PATCH] MDL-45237 report_loglive: prevent debug warnings The use of $PAGE necessitates the $PAGE params to be set. Really the url shouldn't be necessary for this scenario as its enforced for things like redirects. But this is the quick fix to keep our logs clean. --- report/loglive/loglive_ajax.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/report/loglive/loglive_ajax.php b/report/loglive/loglive_ajax.php index a8b6bb655f0..aef3a313f6b 100644 --- a/report/loglive/loglive_ajax.php +++ b/report/loglive/loglive_ajax.php @@ -30,10 +30,13 @@ $page = optional_param('page', 0, PARAM_INT); $since = optional_param('since', 0, PARAM_INT); $logreader = optional_param('logreader', '', PARAM_COMPONENT); // Reader which will be used for displaying logs. +$PAGE->set_url('/report/loglive/loglive_ajax.php'); + // Capability checks. if (empty($id)) { require_login(); $context = context_system::instance(); + $PAGE->set_context($context); } else { $course = get_course($id); require_login($course);