This commit is contained in:
Jun Pataleta 2022-11-07 12:04:46 +08:00
commit 15ac130ba8
25 changed files with 48 additions and 1171 deletions

View file

@ -25,7 +25,6 @@
namespace core\hub;
defined('MOODLE_INTERNAL') || die();
use webservice_xmlrpc_client;
use moodle_exception;
use curl;
use stdClass;
@ -370,4 +369,4 @@ class api {
public static function upload_course_backup($hubcourseid, \stored_file $backupfile) {
debugging("This function has been deprecated as part of the Moodle.net sunsetting process.");
}
}
}

View file

@ -1745,7 +1745,7 @@ class core_plugin_manager {
'binarius', 'boxxie', 'brick', 'canvas', 'formal_white', 'formfactor', 'fusion', 'leatherbound',
'magazine', 'mymobile', 'nimble', 'nonzero', 'overlay', 'serenity', 'sky_high', 'splash',
'standard', 'standardold'),
'webservice' => array('amf'),
'webservice' => array('amf', 'xmlrpc'),
);
if (!isset($plugins[$type])) {
@ -2047,7 +2047,7 @@ class core_plugin_manager {
),
'webservice' => array(
'rest', 'soap', 'xmlrpc'
'rest', 'soap'
),
'workshopallocation' => array(

View file

@ -116,10 +116,6 @@ class webservice extends base {
}
public function is_uninstall_allowed() {
// The xmlrpc plugin contains webservice_xmlrpc_client (used by core).
if ($this->name == 'xmlrpc') {
return false;
}
return true;
}
}

View file

@ -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;
}