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:
Brion Vibber 2010-04-06 14:07:46 -07:00
parent 3172b50fc7
commit 7c3b320a7a
1 changed files with 20 additions and 0 deletions

View File

@ -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();