From e1eadbcf4f9d7608aa7ee22508364dfd49bf69fa Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 18 Aug 2014 21:59:25 +0200 Subject: [PATCH] Fixes for making Meteor working with HTTPS. Signed-off-by: Roland Haeder --- plugins/Meteor/MeteorPlugin.php | 3 ++- plugins/Meteor/js/meteorupdater.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/Meteor/MeteorPlugin.php b/plugins/Meteor/MeteorPlugin.php index 881dfdc1b3..c7d648ed16 100644 --- a/plugins/Meteor/MeteorPlugin.php +++ b/plugins/Meteor/MeteorPlugin.php @@ -103,9 +103,10 @@ class MeteorPlugin extends RealtimePlugin function _updateInitialize($timeline, $user_id) { $script = parent::_updateInitialize($timeline, $user_id); - $ours = sprintf("MeteorUpdater.init(%s, %s, %s);", + $ours = sprintf("MeteorUpdater.init(%s, %s, %s, %s);", json_encode($this->webserver), json_encode($this->webport), + json_encode($this->protocol), json_encode($timeline)); return $script." ".$ours; } diff --git a/plugins/Meteor/js/meteorupdater.js b/plugins/Meteor/js/meteorupdater.js index cdd1d63fab..8e1af13ed6 100644 --- a/plugins/Meteor/js/meteorupdater.js +++ b/plugins/Meteor/js/meteorupdater.js @@ -4,7 +4,7 @@ var MeteorUpdater = function() { return { - init: function(server, port, timeline) + init: function(server, port, scheme, timeline) { Meteor.callbacks["process"] = function(data) { RealtimeUpdate.receive(JSON.parse(data)); @@ -12,6 +12,7 @@ var MeteorUpdater = function() Meteor.host = server; Meteor.port = port; + Meteor.scheme = scheme; Meteor.joinChannel(timeline, 0); Meteor.connect(); }