summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-05-19 15:12:08 +0200
committerLukas Reschke <lukas@owncloud.com>2015-05-19 15:12:08 +0200
commit07483033c1b52efd269a0b1eb8df1d3eb2ad8a2b (patch)
treec0cc74113ea1edd47862023c1a414f5f766d4906 /apps/files_sharing/js/public.js
parent12aef311154f12050c4e33492dac1fb1c928060d (diff)
downloadnextcloud-server-07483033c1b52efd269a0b1eb8df1d3eb2ad8a2b.tar.gz
nextcloud-server-07483033c1b52efd269a0b1eb8df1d3eb2ad8a2b.zip
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 https://github.com/owncloud/core/commit/58a87d0babcb91aab75b45e630d2fc2fee15691e of https://github.com/owncloud/core/pull/15652. Without this fix downloading single files from a public shared folder is not possible.
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r--apps/files_sharing/js/public.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 79bd0bb0c47..73b76b6bafc 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -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) {