mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'MDL-59429-master' of git://github.com/mickhawkins/moodle
This commit is contained in:
commit
f3611eabc8
@ -80,9 +80,16 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($admins[$newmain])) {
|
if (isset($admins[$newmain])) {
|
||||||
|
$logstringold = implode(', ', $admins);
|
||||||
|
|
||||||
unset($admins[$newmain]);
|
unset($admins[$newmain]);
|
||||||
array_unshift($admins, $newmain);
|
array_unshift($admins, $newmain);
|
||||||
|
|
||||||
|
$logstringnew = implode(', ', $admins);
|
||||||
|
|
||||||
set_config('siteadmins', implode(',', $admins));
|
set_config('siteadmins', implode(',', $admins));
|
||||||
|
add_to_config_log('siteadmins', $logstringold, $logstringnew, null);
|
||||||
|
|
||||||
redirect($PAGE->url);
|
redirect($PAGE->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,8 +102,16 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
|
|||||||
$admins[$admin] = $admin;
|
$admins[$admin] = $admin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$logstringold = implode(', ', $admins);
|
||||||
|
|
||||||
$admins[$confirmadd] = $confirmadd;
|
$admins[$confirmadd] = $confirmadd;
|
||||||
|
|
||||||
|
$logstringnew = implode(', ', $admins);
|
||||||
|
|
||||||
set_config('siteadmins', implode(',', $admins));
|
set_config('siteadmins', implode(',', $admins));
|
||||||
|
add_to_config_log('siteadmins', $logstringold, $logstringnew, 'core');
|
||||||
|
|
||||||
redirect($PAGE->url);
|
redirect($PAGE->url);
|
||||||
|
|
||||||
} else if ($confirmdel and confirm_sesskey() and $confirmdel != $USER->id) {
|
} else if ($confirmdel and confirm_sesskey() and $confirmdel != $USER->id) {
|
||||||
@ -107,8 +122,16 @@ if (optional_param('add', false, PARAM_BOOL) and confirm_sesskey()) {
|
|||||||
$admins[$admin] = $admin;
|
$admins[$admin] = $admin;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$logstringold = implode(', ', $admins);
|
||||||
|
|
||||||
unset($admins[$confirmdel]);
|
unset($admins[$confirmdel]);
|
||||||
|
|
||||||
|
$logstringnew = implode(', ', $admins);
|
||||||
|
|
||||||
set_config('siteadmins', implode(',', $admins));
|
set_config('siteadmins', implode(',', $admins));
|
||||||
|
add_to_config_log('siteadmins', $logstringold, $logstringnew, 'core');
|
||||||
|
|
||||||
redirect($PAGE->url);
|
redirect($PAGE->url);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user