Merge branch 'testing' into 1.0.x
This commit is contained in:
commit
be21466bbd
@ -49,10 +49,11 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
public $controlport = null;
|
public $controlport = null;
|
||||||
public $controlserver = null;
|
public $controlserver = null;
|
||||||
public $channelbase = null;
|
public $channelbase = null;
|
||||||
|
public $protocol = null;
|
||||||
public $persistent = true;
|
public $persistent = true;
|
||||||
protected $_socket = null;
|
protected $_socket = null;
|
||||||
|
|
||||||
function __construct($webserver=null, $webport=4670, $controlport=4671, $controlserver=null, $channelbase='')
|
function __construct($webserver=null, $webport=4670, $controlport=4671, $controlserver=null, $channelbase='', $protocol='http')
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
@ -61,6 +62,7 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
$this->controlport = $controlport;
|
$this->controlport = $controlport;
|
||||||
$this->controlserver = (empty($controlserver)) ? $webserver : $controlserver;
|
$this->controlserver = (empty($controlserver)) ? $webserver : $controlserver;
|
||||||
$this->channelbase = $channelbase;
|
$this->channelbase = $channelbase;
|
||||||
|
$this->protocol = $protocol;
|
||||||
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
@ -74,7 +76,8 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
'webport',
|
'webport',
|
||||||
'controlport',
|
'controlport',
|
||||||
'controlserver',
|
'controlserver',
|
||||||
'channelbase');
|
'channelbase',
|
||||||
|
'protocol');
|
||||||
foreach ($settings as $name) {
|
foreach ($settings as $name) {
|
||||||
$val = common_config('meteor', $name);
|
$val = common_config('meteor', $name);
|
||||||
if ($val !== false) {
|
if ($val !== false) {
|
||||||
@ -88,7 +91,11 @@ class MeteorPlugin extends RealtimePlugin
|
|||||||
function _getScripts()
|
function _getScripts()
|
||||||
{
|
{
|
||||||
$scripts = parent::_getScripts();
|
$scripts = parent::_getScripts();
|
||||||
$scripts[] = 'http://'.$this->webserver.(($this->webport == 80) ? '':':'.$this->webport).'/meteor.js';
|
if ($this->protocol == 'https') {
|
||||||
|
$scripts[] = 'https://'.$this->webserver.(($this->webport == 443) ? '':':'.$this->webport).'/meteor.js';
|
||||||
|
} else {
|
||||||
|
$scripts[] = 'http://'.$this->webserver.(($this->webport == 80) ? '':':'.$this->webport).'/meteor.js';
|
||||||
|
}
|
||||||
$scripts[] = $this->path('meteorupdater.min.js');
|
$scripts[] = $this->path('meteorupdater.min.js');
|
||||||
return $scripts;
|
return $scripts;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user