]> git.mjollnir.org Git - moodle.git/commitdiff
MNET: Check that xml-rpc is installed: #MDL-8731 #MDL-8846
authordonal72 <donal72>
Mon, 12 Mar 2007 02:31:50 +0000 (02:31 +0000)
committerdonal72 <donal72>
Mon, 12 Mar 2007 02:31:50 +0000 (02:31 +0000)
admin/mnet/peers.php
lang/en_utf8/mnet.php

index afdf28fe6234fda8e9feefcd481a5733faf999b8..eee628d3150c06dbfe9ec13ef478837ec0168dc3 100644 (file)
@@ -51,6 +51,13 @@ if (($form = data_submitted()) && confirm_sesskey()) {
         // ensure we remove trailing slashes
         $form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
     }
+
+    if(!function_exists('xmlrpc_encode_request')) {
+        trigger_error("You must have xml-rpc enabled in your PHP build to use this feature.");
+        error(get_string('xmlrpc-missing', 'mnet'),'peers.php');
+        exit;
+    }
+
     if (!empty($form->updateregisterall)) {
         if (!empty($form->registerallhosts)) {
             set_config('mnet_register_allhosts',1);
index 2f1f89ee10774824591a4108fc8c9eb28ca421f5..0d6d8d85beb17d9d2f849d348eff5f7513856cdd 100644 (file)
@@ -1,4 +1,5 @@
 <?PHP
+$string['xmlrpc-missing']               = 'You must have XML-RPC installed in your PHP build to be able to use this feature.';
 $string['description']                  = 'Description';
 $string['mnet']                         = 'Moodle Networking';
 $string['net']                          = 'Networking';