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:
Petr Skoda 2010-08-16 19:11:21 +00:00
parent df92ba9a43
commit eb5bdb3510
4 changed files with 65 additions and 26 deletions

View file

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