mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-23797 improved detection of PAGE->context abuse andproblems; fixed incorrect use of this->context instead of this->_context; missing PAGE->context does not throw fatal error any more
This commit is contained in:
parent
df92ba9a43
commit
eb5bdb3510
4 changed files with 65 additions and 26 deletions
|
@ -5391,7 +5391,7 @@ class admin_setting_manageportfolio extends admin_setting {
|
|||
function admin_externalpage_setup($section, $extrabutton = '', array $extraurlparams = null, $actualurl = '') {
|
||||
global $CFG, $PAGE, $USER, $SITE, $OUTPUT;
|
||||
|
||||
$PAGE->set_context(get_context_instance(CONTEXT_SYSTEM));
|
||||
$PAGE->set_context(null); // hack - set context to something, by default to system context
|
||||
|
||||
$site = get_site();
|
||||
require_login();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue