Permalink
Browse files

MDL-31330 admin: fix incorrect context use

This was introduced by MDL-31006, being backported to 21_STABLE
and that use escaped the (my) scrutiny :-( (the new access API is
22_STABLE and upwards only)
  • Loading branch information...
1 parent 1aff7bb commit 705052819553abdc7f5086c471cce7fb973d7883 @stronk7 stronk7 committed Jan 22, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 admin/enrol.php
View
@@ -31,7 +31,7 @@
$confirm = optional_param('confirm', 0, PARAM_BOOL);
$PAGE->set_url('/admin/enrol.php');
-$PAGE->set_context(context_system::instance());
+$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
require_login();
require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
@@ -119,4 +119,4 @@
}
-redirect($return);
+redirect($return);

0 comments on commit 7050528

Please sign in to comment.