mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-66911 files: Update $CFG->licenses when adding/deleting licenses
* When creating custom licenses, the list of active licenses ($CFG->licenses) also needs to be updated. Same when a custom license is being deleted.
This commit is contained in:
parent
1389465c29
commit
a996318c9d
@ -127,6 +127,8 @@ class license_manager {
|
||||
|
||||
$DB->insert_record('license', $license);
|
||||
self::reset_license_cache();
|
||||
// Update the config setting of active licenses.
|
||||
self::set_active_licenses();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -203,6 +205,9 @@ class license_manager {
|
||||
}
|
||||
}
|
||||
|
||||
// Update the config setting of active licenses as well.
|
||||
self::set_active_licenses();
|
||||
|
||||
} else {
|
||||
throw new moodle_exception('cannotdeletecore', 'license');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user