mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Rename the 'promiscous' mode to 'dangerous' as promiscuous is used elsewhere.
This commit is contained in:
parent
4fc66605f2
commit
68bcd355af
@ -39,7 +39,7 @@
|
||||
/// If data submitted, process and store
|
||||
if (($form = data_submitted()) && confirm_sesskey()) {
|
||||
if (!empty($form->submit) && $form->submit == get_string('savechanges')) {
|
||||
if (in_array($form->mode, array("off", "strict", "promiscuous"))) {
|
||||
if (in_array($form->mode, array("off", "strict", "dangerous"))) {
|
||||
if (set_config('mnet_dispatcher_mode', $form->mode)) {
|
||||
redirect('index.php', get_string('changessaved'));
|
||||
} else {
|
||||
|
@ -411,7 +411,7 @@ function mnet_permit_rpc_call($includefile, $functionname, $class=false) {
|
||||
|
||||
$permissionobj = record_exists_sql($sql);
|
||||
|
||||
if ($permissionobj === false) {
|
||||
if ($permissionobj === false && 'dangerous' != $CFG->mnet_dispatcher_mode) {
|
||||
return RPC_FORBIDDENMETHOD;
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ function mnet_server_dispatch($payload) {
|
||||
}
|
||||
|
||||
////////////////////////////////////// STRICT MOD/*
|
||||
} elseif ($callstack[0] == 'mod' || 'promiscuous' == $CFG->mnet_dispatcher_mode) {
|
||||
} elseif ($callstack[0] == 'mod' || 'dangerous' == $CFG->mnet_dispatcher_mode) {
|
||||
list($base, $module, $filename, $functionname) = $callstack;
|
||||
|
||||
////////////////////////////////////// STRICT MOD/*
|
||||
@ -478,8 +478,8 @@ function mnet_server_dispatch($payload) {
|
||||
$response = mnet_server_prepare_response($response);
|
||||
echo $response;
|
||||
|
||||
////////////////////////////////////// PROMISCUOUS
|
||||
} elseif ('promiscuous' == $CFG->mnet_dispatcher_mode && $MNET_REMOTE_CLIENT->plaintext_is_ok()) {
|
||||
////////////////////////////////////// DANGEROUS
|
||||
} elseif ('dangerous' == $CFG->mnet_dispatcher_mode && $MNET_REMOTE_CLIENT->plaintext_is_ok()) {
|
||||
|
||||
$functionname = array_pop($callstack);
|
||||
$filename = array_pop($callstack);
|
||||
|
Loading…
x
Reference in New Issue
Block a user