MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler - Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API - Modify web services to return information from the 3rd party handler instead of core if needed
This commit is contained in:
@@ -211,7 +211,9 @@ class api {
|
||||
}
|
||||
|
||||
if (empty($section) or $section == 'sitepolicies') {
|
||||
$settings->sitepolicy = $CFG->sitepolicy;
|
||||
$manager = new \core_privacy\local\sitepolicy\manager();
|
||||
$settings->sitepolicy = ($sitepolicy = $manager->get_embed_url()) ? $sitepolicy->out(false) : '';
|
||||
$settings->sitepolicyhandler = $CFG->sitepolicyhandler;
|
||||
$settings->disableuserimages = $CFG->disableuserimages;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user