From e1cf6b4be22f5bffdb20eac07161730fa4c46b14 Mon Sep 17 00:00:00 2001 From: Jerome Mouneyrac Date: Fri, 27 Jan 2012 16:10:05 +0800 Subject: [PATCH] MDL-29471 php warning when adding function to a new web service --- admin/webservice/forms.php | 2 +- admin/webservice/service_functions.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/webservice/forms.php b/admin/webservice/forms.php index dab9a42f661..5185b9bf323 100644 --- a/admin/webservice/forms.php +++ b/admin/webservice/forms.php @@ -160,7 +160,7 @@ class external_service_functions_form extends moodleform { $functions[$functionid] = $function->name . ':' . $function->description; } - $mform->addElement('searchableselector', 'fid', get_string('name'), + $mform->addElement('searchableselector', 'fids', get_string('name'), $functions, array('multiple')); $mform->addElement('hidden', 'id'); diff --git a/admin/webservice/service_functions.php b/admin/webservice/service_functions.php index d4f7da8ac16..fc0e8869a24 100644 --- a/admin/webservice/service_functions.php +++ b/admin/webservice/service_functions.php @@ -67,7 +67,7 @@ switch ($action) { //add the function to the service then redirect to function list page if ($data = $mform->get_data()) { ignore_user_abort(true); // no interruption here! - foreach ($data->fid as $fid) { + foreach ($data->fids as $fid) { $function = $webservicemanager->get_external_function_by_id( $fid, MUST_EXIST); // make sure the function is not there yet