[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src

Ashod Nakashian ashod.nakashian at collabora.co.uk
Thu Jun 15 09:54:52 UTC 2017


 loleaflet/src/core/Socket.js |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 2fc7d50607b14df8ad8055e6d74a9c7970db1ae0
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Wed Jun 14 21:44:10 2017 -0400

    Revert "loleaflet: Shorten the docuri in the websocket request."
    
    No WOPI doc can be loaded with this patch as the URL is all wrong
    and the access_token missing.
    
    This reverts commit ad8b437360cd0b7a95fd587f7b17d4cf1f385ca1.
    
    Change-Id: Icced96564e61eb137c1620a7fb7e66c5ef8e5a5b
    Reviewed-on: https://gerrit.libreoffice.org/38810
    Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
    Tested-by: Ashod Nakashian <ashnakash at gmail.com>
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index bb4acf03..e137acca 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -19,12 +19,10 @@ L.Socket = L.Class.extend({
 		console.debug('socket.initialize:');
 		this._map = map;
 		try {
-			var paramsForURI = '';
 			if (map.options.permission) {
 				map.options.docParams['permission'] = map.options.permission;
-				paramsForURI = '?' + 'permission=' + map.options.permission;
 			}
-			this.socket = new WebSocket(map.options.server + '/lool/' + encodeURIComponent(map.options.doc + paramsForURI) + '/ws');
+			this.socket = new WebSocket(map.options.server + '/lool/' + encodeURIComponent(map.options.doc + '?' + $.param(map.options.docParams)) + '/ws');
 			this.socket.onerror = L.bind(this._onSocketError, this);
 			this.socket.onclose = L.bind(this._onSocketClose, this);
 			this.socket.onopen = L.bind(this._onSocketOpen, this);


More information about the Libreoffice-commits mailing list