mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
output MDL-24683 Fixed up premature initialisation of theme and output through the admin structure.
This commit is contained in:
parent
019ae3e1c3
commit
b4c91012d4
@ -331,7 +331,12 @@ if ($hassiteconfig) {
|
||||
if (empty($CFG->enablewebservices)) {
|
||||
$temp->add(new admin_setting_heading('webservicesaredisabled', '', get_string('disabledwarning', 'webservice')));
|
||||
}
|
||||
$wsdoclink = $OUTPUT->doc_link('How_to_get_a_security_key');
|
||||
|
||||
// We cannot use $OUTPUT this early, doing so means that we lose the ability
|
||||
// to set the page layout on all admin pages.
|
||||
// $wsdoclink = $OUTPUT->doc_link('How_to_get_a_security_key');
|
||||
$url = new moodle_url(get_docs_url('How_to_get_a_security_key'));
|
||||
$wsdoclink = html_writer::tag('a', get_string('supplyinfo'),array('href'=>$url));
|
||||
$temp->add(new admin_setting_configcheckbox('enablewsdocumentation', get_string('enablewsdocumentation',
|
||||
'admin'), get_string('configenablewsdocumentation', 'admin', $wsdoclink), false));
|
||||
$ADMIN->add('webservicesettings', $temp);
|
||||
|
@ -1203,6 +1203,11 @@ class moodle_page {
|
||||
public function initialise_theme_and_output() {
|
||||
global $OUTPUT, $PAGE, $SITE;
|
||||
|
||||
// If you have lost all blocks on a page and cannot work out why
|
||||
// try uncommenting this this debugging line and seeing what you get.
|
||||
// Chances are the theme and output are being initialised prematurely.
|
||||
// debugging('Initialising theme and output with layout '.$this->_pagelayout, DEBUG_DEVELOPER);
|
||||
|
||||
if (!empty($this->_wherethemewasinitialised)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user