MDL-70041 filepicker: Make sure the user has a recently used license
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user