mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-21784, fixed undefined savepath parameter
This commit is contained in:
parent
4043abef29
commit
392d5fd41e
@ -75,6 +75,9 @@ M.core_filepicker.init = function(Y, options) {
|
|||||||
|
|
||||||
initializer: function(options) {
|
initializer: function(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
|
if (!this.options.savepath) {
|
||||||
|
this.options.savepath = '/';
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
destructor: function() {
|
destructor: function() {
|
||||||
@ -392,11 +395,13 @@ M.core_filepicker.init = function(Y, options) {
|
|||||||
params['license'] = license.get('value');
|
params['license'] = license.get('value');
|
||||||
}
|
}
|
||||||
var author = Y.one('#text-author-'+client_id);
|
var author = Y.one('#text-author-'+client_id);
|
||||||
if (author) {
|
if (author){
|
||||||
params['author'] = author.get('value');
|
params['author'] = author.get('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.options.env == 'editor') {
|
if (this.options.env == 'editor') {
|
||||||
|
// in editor, images are stored in '/' only
|
||||||
|
params.savepath = '/';
|
||||||
var linkexternal = Y.one('#linkexternal-'+client_id).get('checked');
|
var linkexternal = Y.one('#linkexternal-'+client_id).get('checked');
|
||||||
if (linkexternal) {
|
if (linkexternal) {
|
||||||
params['linkexternal'] = 'yes';
|
params['linkexternal'] = 'yes';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user