From 2b9cc35e36281d9d466a110fc33a953c1b0158c0 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Fri, 29 Oct 2010 20:08:29 +0000 Subject: [PATCH] MDL-24938 fixed missing context ino --- userpix/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/userpix/index.php b/userpix/index.php index 9c234a6c09474..652df70401f0b 100644 --- a/userpix/index.php +++ b/userpix/index.php @@ -13,10 +13,11 @@ require_login(); /// Remove the following three lines if you want everyone to access it -require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM)); +$syscontext = get_context_instance(CONTEXT_SYSTEM); +require_capability('moodle/site:config', $syscontext); $title = get_string("users"); - +$PAGE->set_context($syscontext); $PAGE->navbar->add($title); $PAGE->set_title($title); $PAGE->set_heading($title); @@ -27,7 +28,6 @@ $fullname = fullname($user); echo "wwwroot/user/view.php?id=$user->id&course=1\" ". "title=\"$fullname\">"; - require_once($CFG->libdir.'/filelib.php'); echo $OUTPUT->user_picture($user); echo " \n"; }