Skip to content

Commit

Permalink
ForumNG: Max upload does not support ignorefilesizelimits #4887
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-platts authored and sammarshallou committed Jan 22, 2013
1 parent 2896a3b commit ff454d1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mod_forumng.php
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,15 @@ public function has_unread_discussions() {
*/
public function get_max_bytes() {
if ($this->forumfields->attachmentmaxbytes) {
return $this->forumfields->attachmentmaxbytes;
if ($this->forumfields->attachmentmaxbytes == -1) {
return -1;
} else {
return get_user_max_upload_file_size($this->get_context(),
$this->forumfields->attachmentmaxbytes);
}
} else {
return $this->get_course()->maxbytes;
return get_user_max_upload_file_size($this->get_context(),
$this->get_course()->maxbytes);
}
}

Expand Down

0 comments on commit ff454d1

Please sign in to comment.