mirror of
https://github.com/moodle/moodle.git
synced 2025-04-26 19:03:38 +02:00
MDL-66911 files: Use proper function for fetching enabled licenses
This commit is contained in:
parent
4eaa7269a6
commit
1389465c29
@ -539,10 +539,8 @@ class core_files_renderer extends plugin_renderer_base {
|
||||
|
||||
$licenses = [];
|
||||
// Discard licenses without a name or source from enabled licenses.
|
||||
foreach (license_manager::get_licenses(['enabled' => 1]) as $license) {
|
||||
foreach (license_manager::get_active_licenses() as $license) {
|
||||
if (!empty($license->fullname) && !empty($license->source)) {
|
||||
// Get license fullname strings using the shortname for internationalisation.
|
||||
$license->fullname = get_string($license->shortname, 'license');
|
||||
$licenses[] = $license;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user