-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
3.11.10, 4.0.4, 4.1
-
None
-
MOODLE_311_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
This has been detected while working in the removal of the webservice_xmlrpc from core @ MDL-76052.
Looking for remaining usages of xmlrpc in core, it has been detected that there are stuff using it straight from the component. That's absolutely incorrect and that functionality should be moved to the plugin implementations in an orchestrated (from the subsystem) way.
Just look for these strings within the /webservice directory and in the lang/en/webservice.php lang file, now that the xmlrpc plugin is gone and you'll understand it:
- phpparam
- phpresponse
- xmlrpc
- xmlrpc_param_description_html
$ ag 'phpparam|phpresponse|xml-rpc|xmlrpc' webservice/ lang/en/webservice.php --php
|
webservice/wsdoc.php
|
74:$activatedprotocol['xmlrpc'] = webservice_protocol_is_enabled('xmlrpc');
|
|
webservice/renderer.php
|
498: * Create indented XML-RPC param description
|
504: public function xmlrpc_param_description_html($paramdescription, $indentation = "") {
|
516: $return .= $this->xmlrpc_param_description_html($paramdescription->content, $indentation);
|
526: $this->xmlrpc_param_description_html(
|
725: // xml-rpc structure of the argument in PHP format
|
726: if (!empty($activatedprotocol['xmlrpc'])) {
|
728: get_string('phpparam', 'webservice'),
|
730: . $this->xmlrpc_param_description_html($paramdesc)),
|
763: // xml-rpc structure of the response in PHP format
|
764: if (!empty($activatedprotocol['xmlrpc'])) {
|
766: get_string('phpresponse', 'webservice'),
|
767: htmlentities($this->xmlrpc_param_description_html(
|
|
lang/en/webservice.php
|
141:$string['phpparam'] = 'XML-RPC (PHP structure)';
|
142:$string['phpresponse'] = 'XML-RPC (PHP structure)';
|
Note that something similar may happen with other webservice plugins (rest, soap...).
So this is issue is about to analyse which plugin functionalities / lang strings are being incorrectly provided straight from core_webservice and move them to the plugins, so they are 100% self-contained (of course, the subsystem still will be able to add use/execute them, but they belong to the plugins).
To facilitate the findings... look for MDL-76078 in codebase, the functions violating the rules have been tagged with TODO/@todo. And don't forget the lang strings too.
$ ag MDL-76078
|
admin/webservice/documentation.php
|
39:// TODO: MDL-76078 - Incorrect inter-communication, core cannot have plugin dependencies like this.
|
|
webservice/wsdoc.php
|
71:// TODO: MDL-76078 - Incorrect inter-communication, core cannot have plugin dependencies like this.
|
|
webservice/renderer.php
|
500: * @todo MDL-76078 - Incorrect inter-communication, core cannot have plugin dependencies like this.
|
580: * @todo MDL-76078 - Incorrect inter-communication, core cannot have plugin dependencies like this.
|
627: * @todo MDL-76078 - Incorrect inter-communication, core cannot have plugin dependencies like this.
|
Ciao
- Discovered while testing
-
MDL-76052 Remove webservice_xmlrpc from core
- Closed