Skip to content

Commit

Permalink
Fix URL generation
Browse files Browse the repository at this point in the history
`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 owncloud#16336 which is a regression introduced with owncloud@58a87d0 of owncloud#15652.

Without this fix downloading single files from a public shared folder is not possible.
  • Loading branch information
LukasReschke authored and mmattel committed May 22, 2015
1 parent 4ac0efd commit e274f63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_sharing/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e274f63

Please sign in to comment.