mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
Changed to require_capability where possible
This commit is contained in:
parent
86328d5821
commit
7c900d5d62
@ -47,9 +47,8 @@
|
||||
|
||||
|
||||
if (!empty($move)) {
|
||||
if (!has_capability('mod/forum:movediscussions', $modcontext)) {
|
||||
error("You do not have the permission to move this discussion!");
|
||||
}
|
||||
require_capability('mod/forum:movediscussions', $modcontext);
|
||||
|
||||
if ($forum = get_record("forum", "id", $move)) {
|
||||
if (!forum_move_attachments($discussion, $move)) {
|
||||
notify("Errors occurred while moving attachment directories - check your file permissions");
|
||||
|
Loading…
x
Reference in New Issue
Block a user