Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-32454 Fix issues highlighted by strict warnings in MNet code

  • Loading branch information...
commit 5f73b066b58fd16d62427fe893b0953bee0386b7 1 parent 238c24d
@andrewnicols andrewnicols authored stronk7 committed
View
4 admin/mnet/peer_forms.php
@@ -50,7 +50,7 @@ function definition() {
$this->add_action_buttons(false, get_string('addhost', 'mnet'));
}
- function validation($data) {
+ function validation($data, $files) {
global $DB;
$wwwroot = $data['wwwroot'];
@@ -154,7 +154,7 @@ function definition() {
$this->add_action_buttons(false);
}
- function validation($data) {
+ function validation($data, $files) {
$errors = array();
if ($data['oldpublickey'] == $data['public_key']) {
return;
View
13 admin/mnet/profilefields_form.php
@@ -39,6 +39,15 @@ function definition() {
global $CFG;
$mform =& $this->_form;
+ $mnetprofileimportfields = '';
+ if (isset($CFG->mnetprofileimportfields)) {
+ $mnetprofileimportfields = str_replace(',', ', ', $CFG->mnetprofileimportfields);
+ }
+
+ $mnetprofileexportfields = '';
+ if (isset($CFG->mnetprofileexportfields)) {
+ $mnetprofileexportfields = str_replace(',', ', ', $CFG->mnetprofileexportfields);
+ }
$mform->addElement('hidden', 'hostid', $this->_customdata['hostid']);
$fields = mnet_profile_field_options();
@@ -49,7 +58,7 @@ function definition() {
$select = $mform->addElement('select', 'importfields', get_string('importfields', 'mnet'), $fields['optional']);
$select->setMultiple(true);
- $mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileimportfields));
+ $mform->addElement('checkbox', 'importdefault', get_string('leavedefault', 'mnet'), $mnetprofileimportfields);
// Fields to export ----------------------------------------------------
$mform->addElement('header', 'export', get_string('exportfields', 'mnet'));
@@ -57,7 +66,7 @@ function definition() {
$select = $mform->addElement('select', 'exportfields', get_string('exportfields', 'mnet'), $fields['optional']);
$select->setMultiple(true);
- $mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), str_replace(',', ', ', $CFG->mnetprofileexportfields));
+ $mform->addElement('checkbox', 'exportdefault', get_string('leavedefault', 'mnet'), $mnetprofileexportfields);
$this->add_action_buttons();
}
View
2  admin/mnet/services_form.php
@@ -36,7 +36,7 @@ class mnet_services_form extends moodleform {
function definition() {
$mform =& $this->_form;
$mnet_peer =& $this->_customdata['peer'];
- $myservices =& mnet_get_service_info($mnet_peer);
+ $myservices = mnet_get_service_info($mnet_peer);
$mform->addElement('hidden', 'hostid', $mnet_peer->id);
Please sign in to comment.
Something went wrong with that request. Please try again.