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.
This commit is contained in:
Dan Poltawski 2014-05-01 14:16:56 +08:00
parent f500ff4e52
commit c6b8b0a827

View File

@ -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);