Fix URL generation

`params` in the `OC.generateUrl` function call only replaces all specified occurences of a key just like the l10n PHP functionality does.

This means that to build a query string we have to use `OC.buildQueryString` instead of the params parameters.

Fixes https://github.com/owncloud/core/issues/16336 which is a regression introduced with 58a87d0bab of https://github.com/owncloud/core/pull/15652.

Without this fix downloading single files from a public shared folder is not possible.
This commit is contained in:
Lukas Reschke 2015-05-19 15:12:08 +02:00
parent 12aef31115
commit 07483033c1

View file

@ -144,7 +144,7 @@ OCA.Sharing.PublicApp = {
path: path,
files: filename
};
return OC.generateUrl('/s/' + token + '/download', params);
return OC.generateUrl('/s/' + token + '/download') + '?' + OC.buildQueryString(params);
};
this.fileList.getAjaxUrl = function (action, params) {