mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Merge pull request #379 from catalyst/378-add-install-check
Issue #378: Add install check to before_standard_top_of_body_html_generation()
This commit is contained in:
@@ -35,6 +35,13 @@ class hook_callbacks {
|
||||
* @param before_standard_top_of_body_html_generation $hook
|
||||
*/
|
||||
public static function before_standard_top_of_body_html_generation(before_standard_top_of_body_html_generation $hook): void {
|
||||
global $CFG;
|
||||
|
||||
if (during_initial_install() || isset($CFG->upgraderunning)) {
|
||||
// Do nothing during installation or upgrade.
|
||||
return;
|
||||
}
|
||||
|
||||
// Get code to inject.
|
||||
$hook->add_html(outagelib::get_inject_code());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user