From: Frederic Massart Date: Mon, 16 Nov 2015 07:35:20 +0000 (+0800) Subject: New script to refresh services and external functions X-Git-Tag: v1.5.2~1 X-Git-Url: http://git.cameron1729.xyz/?p=mdk.git;a=commitdiff_plain;h=66f49e8441f97cec4707d940f1bcee556aacc2f9 New script to refresh services and external functions --- diff --git a/mdk/scripts/external_functions.php b/mdk/scripts/external_functions.php new file mode 100644 index 0000000..75c88e7 --- /dev/null +++ b/mdk/scripts/external_functions.php @@ -0,0 +1,41 @@ +. + +/** + * Script to refresh the services and external functions. + * + * @package mdk + * @copyright 2015 Frédéric Massart - FMCorz.net + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +define('CLI_SCRIPT', true); +require('config.php'); +require($CFG->libdir . '/upgradelib.php'); + +mtrace('Updating services of core'); +external_update_descriptions('moodle'); + +$plugintypes = core_component::get_plugin_types(); +foreach ($plugintypes as $plugintype => $dir) { + $plugins = core_component::get_plugin_list($plugintype); + foreach ($plugins as $plugin => $dir) { + $component = $plugintype . '_' . $plugin; + mtrace('Updating services of ' . $component); + external_update_descriptions($component); + } +} +