Skip to content

Commit

Permalink
MDL-70041 filepicker: Make sure the user has a recently used license
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihail Geshoski committed Oct 28, 2020
1 parent 99680d1 commit 81d0642
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/form/filemanager.js
Expand Up @@ -714,7 +714,8 @@ M.form_filemanager.init = function(Y, options) {
if (filenode) {
// File has a license already, use it.
selectedlicense = filenode.license;
} else if (this.filepicker_options.rememberuserlicensepref) {
} else if (this.filepicker_options.rememberuserlicensepref && this.get_preference('recentlicense')) {
// When 'Remember user licence preference' is enabled use the last license selected by the user, if any.
selectedlicense = this.get_preference('recentlicense');
}
var licenses = this.filepicker_options.licenses;
Expand Down
3 changes: 2 additions & 1 deletion repository/filepicker.js
Expand Up @@ -1784,7 +1784,8 @@ M.core_filepicker.init = function(Y, options) {
if (filenode) {
// File has a license already, use it.
selectedlicense = filenode.license;
} else if (this.options.rememberuserlicensepref) {
} else if (this.options.rememberuserlicensepref && this.get_preference('recentlicense')) {
// When 'Remember user licence preference' is enabled use the last license selected by the user, if any.
selectedlicense = this.get_preference('recentlicense');
}
var licenses = this.options.licenses;
Expand Down

0 comments on commit 81d0642

Please sign in to comment.