mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-20712 using just $capablities for capability definition array, all other files in db/* do not use component names in definition array; old capability array names are of course supported
This commit is contained in:
parent
e3acc8af7a
commit
0ac940b3bf
64 changed files with 92 additions and 124 deletions
|
@ -3177,7 +3177,11 @@ function load_capability_def($component) {
|
|||
$capabilities = array();
|
||||
if (file_exists($defpath)) {
|
||||
require($defpath);
|
||||
$capabilities = ${$component.'_capabilities'};
|
||||
if (!empty(${$component.'_capabilities'})) {
|
||||
// legacy capability array name
|
||||
// since 2.0 we prefer $capabilities instead - it is easier to use and matches db/* files
|
||||
$capabilities = ${$component.'_capabilities'};
|
||||
}
|
||||
}
|
||||
|
||||
return $capabilities;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue