mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-30792 Files API: Cleaner approach to get maxbytes size in filepicker
This commit is contained in:
parent
7030756a98
commit
960f437972
3 changed files with 9 additions and 13 deletions
|
@ -5861,15 +5861,15 @@ function get_max_upload_file_size($sitebytes=0, $coursebytes=0, $modulebytes=0)
|
|||
}
|
||||
}
|
||||
|
||||
if ($sitebytes and $sitebytes < $minimumsize) {
|
||||
if (($sitebytes > 0) and ($sitebytes < $minimumsize)) {
|
||||
$minimumsize = $sitebytes;
|
||||
}
|
||||
|
||||
if ($coursebytes and $coursebytes < $minimumsize) {
|
||||
if (($coursebytes > 0) and ($coursebytes < $minimumsize)) {
|
||||
$minimumsize = $coursebytes;
|
||||
}
|
||||
|
||||
if ($modulebytes and $modulebytes < $minimumsize) {
|
||||
if (($modulebytes > 0) and ($modulebytes < $minimumsize)) {
|
||||
$minimumsize = $modulebytes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue