mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +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
1 changed files with 5 additions and 0 deletions
|
@ -127,6 +127,8 @@ class license_manager {
|
||||||
|
|
||||||
$DB->insert_record('license', $license);
|
$DB->insert_record('license', $license);
|
||||||
self::reset_license_cache();
|
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 {
|
} else {
|
||||||
throw new moodle_exception('cannotdeletecore', 'license');
|
throw new moodle_exception('cannotdeletecore', 'license');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue