Add configuration check. Need 'server', 'port', 'user' and 'password' to be defined (not valid, just defined).

This commit is contained in:
Jean Baptiste Favre 2012-08-26 23:20:03 +02:00
parent f175512748
commit 1b39f89b96
1 changed files with 11 additions and 5 deletions

View File

@ -442,11 +442,17 @@ class XmppPlugin extends ImPlugin
*/
function onGetValidDaemons($daemons)
{
array_push(
$daemons,
INSTALLDIR
. '/scripts/imdaemon.php'
);
if( isset($this->server) &&
isset($this->port) &&
isset($this->user) &&
isset($this->password) ){
array_push(
$daemons,
INSTALLDIR
. '/scripts/imdaemon.php'
);
}
return true;
}