Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
50dcc8af
Commit
50dcc8af
authored
Mar 02, 2017
by
Andrew Nicols
Browse files
MDL-53978 core: Do not run callbacks if upgrade is running
parent
bb9716cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/moodlelib.php
View file @
50dcc8af
...
...
@@ -7474,6 +7474,11 @@ function get_plugin_list_with_function($plugintype, $function, $file = 'lib.php'
function
get_plugins_with_function
(
$function
,
$file
=
'lib.php'
,
$include
=
true
)
{
global
$CFG
;
if
(
during_initial_install
()
||
isset
(
$CFG
->
upgraderunning
))
{
// API functions _must not_ be called during an installation or upgrade.
return
[];
}
$cache
=
\
cache
::
make
(
'core'
,
'plugin_functions'
);
// Including both although I doubt that we will find two functions definitions with the same name.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment