[Pkg-owncloud-commits] [owncloud] 74/457: Fix URL generation

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:05:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 07483033c1b52efd269a0b1eb8df1d3eb2ad8a2b
Author: Lukas Reschke <lukas at owncloud.com>
Date:   Tue May 19 15:12:08 2015 +0200

    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.
---
 apps/files_sharing/js/public.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 79bd0bb..73b76b6 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) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list