Skip to content

Commit

Permalink
MDL-27156 maxfilesize: Comment out new cap use + return -1 as temp fix
Browse files Browse the repository at this point in the history
With the capability check and the return -1 commented
it has been checked here that it's possible to upload
and pick from filesystem repository files normally, so
I'm introducing this temp commit to allow people to
use those repos "normallly" until a proper fix arrives
supporting the new cap.
  • Loading branch information
stronk7 committed Jun 15, 2012
1 parent ad9fa97 commit a4b9f21
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -5860,9 +5860,10 @@ function get_user_max_upload_file_size($context, $sitebytes=0, $coursebytes=0, $
$user = $USER;
}

if (has_capability('moodle/course:ignorefilesizelimits', $context, $user)) {
return -1;
}
// Temp. commenting this until MDL-27156 fixes it!
// if (has_capability('moodle/course:ignorefilesizelimits', $context, $user)) {
// return -1;
// }

return get_max_upload_file_size($sitebytes, $coursebytes, $modulebytes);
}
Expand Down

0 comments on commit a4b9f21

Please sign in to comment.