mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
Merge branch 'MDL-29835_master' of git://github.com/pauln/moodle
This commit is contained in:
commit
aa452f97e3
@ -537,7 +537,8 @@ M.form_dndupload.init = function(Y, options) {
|
||||
if (!overwrite) {
|
||||
this.currentfilecount++;
|
||||
}
|
||||
if (this.options.maxfiles > 0 && this.currentfilecount > this.options.maxfiles) {
|
||||
// The value for "unlimited files" is -1, so 0 should mean 0.
|
||||
if (this.options.maxfiles >= 0 && this.currentfilecount > this.options.maxfiles) {
|
||||
// Too many files - abort entire upload.
|
||||
this.uploadqueue = [];
|
||||
this.renamequeue = [];
|
||||
|
@ -332,7 +332,8 @@ class form_filemanager implements renderable {
|
||||
$defaults['defaultlicense'] = $CFG->sitedefaultlicense;
|
||||
}
|
||||
foreach ($defaults as $key=>$value) {
|
||||
if (empty($options->$key)) {
|
||||
// Using !isset() prevents us from overwriting falsey values with defaults (as empty() did).
|
||||
if (!isset($options->$key)) {
|
||||
$options->$key = $value;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user