mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-76052 webservice_xmlrpc: Remove it completely from core
Normal removal procedure: - Remove the plugin completely from core. - Document it in the webservices upgrade.txt file. - Add a core upgrade step to proceed to remove any configuration if the plugin has not been re-installed manually. Plus: - Remove a few remaining uses in the hub/sites registration scripts, that were moved from xmlrpc to hand.made rest calls by MDL-31436 (Moodle 3.4.1 and up) and never removed then. - Remove the php-xmlrpc extension as a recommendation in composer. - Remove "xmlrpc" from various comments, trivial cleanup. Note: - While working on this MDL-76078 has been created about to fix a serious design problem detected (it does not affect functionality). That's out from this issue scope.
This commit is contained in:
parent
fee1b8ce5f
commit
df227f3819
22 changed files with 38 additions and 1171 deletions
|
@ -3005,5 +3005,31 @@ privatefiles,moodle|/user/files.php';
|
|||
upgrade_main_savepoint(true, 2022102800.01);
|
||||
}
|
||||
|
||||
if ($oldversion < 2022110600.00) {
|
||||
// If webservice_xmlrpc isn't any longer installed, remove its configuration,
|
||||
// capabilities and presence in other settings.
|
||||
if (!file_exists($CFG->dirroot . '/webservice/xmlrpc/version.php')) {
|
||||
// No DB structures to delete in this plugin.
|
||||
|
||||
// Remove capabilities.
|
||||
capabilities_cleanup('webservice_xmlrpc');
|
||||
|
||||
// Remove own configuration.
|
||||
unset_all_config_for_plugin('webservice_xmlrpc');
|
||||
|
||||
// Remove it from the enabled protocols if it was there.
|
||||
$protos = get_config('core', 'webserviceprotocols');
|
||||
$protoarr = explode(',', $protos);
|
||||
$protoarr = array_filter($protoarr, function($ele) {
|
||||
return trim($ele) !== 'xmlrpc';
|
||||
});
|
||||
$protos = implode(',', $protoarr);
|
||||
set_config('webserviceprotocols', $protos);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2022110600.00);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue