Allow Meteor plugin to be configurable via configuration database or file.
As there's no admin control panel yet, this is mainly meant for batch administration and using setconfig.php
This commit is contained in:
@@ -65,6 +65,26 @@ class MeteorPlugin extends RealtimePlugin
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Pull settings from config file/database if set.
|
||||
*/
|
||||
function initialize()
|
||||
{
|
||||
$settings = array('webserver',
|
||||
'webport',
|
||||
'controlport',
|
||||
'controlserver',
|
||||
'channelbase');
|
||||
foreach ($settings as $name) {
|
||||
$val = common_config('meteor', $name);
|
||||
if ($val !== false) {
|
||||
$this->$name = $val;
|
||||
}
|
||||
}
|
||||
|
||||
return parent::initialize();
|
||||
}
|
||||
|
||||
function _getScripts()
|
||||
{
|
||||
$scripts = parent::_getScripts();
|
||||
|
Reference in New Issue
Block a user