mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
"MDL-23917, fixed ignore_premission logic"
This commit is contained in:
parent
d45c1ee51a
commit
a85265f486
@ -31,13 +31,14 @@ $PAGE->set_url('/comment/comment_ajax.php');
|
||||
|
||||
$action = optional_param('action', '', PARAM_ALPHA);
|
||||
|
||||
$ignore_permission = false;
|
||||
// XXX: display comments in frontpage without login
|
||||
if ($context->id != get_context_instance(CONTEXT_COURSE, SITEID)->id
|
||||
or $action == 'add'
|
||||
or $action == 'delete') {
|
||||
$ignore_permission = true;
|
||||
$ignore_permission = false;
|
||||
require_login($course, true, $cm);
|
||||
} else {
|
||||
$ignore_permission = true;
|
||||
}
|
||||
require_sesskey();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user