]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Add configuration check. Need 'server', 'port', 'user' and 'password' to be defined...
authorJean Baptiste Favre <statusnet@jbfavre.org>
Sun, 26 Aug 2012 21:20:03 +0000 (23:20 +0200)
committerJean Baptiste Favre <statusnet@jbfavre.org>
Sat, 15 Jun 2013 16:59:17 +0000 (18:59 +0200)
plugins/Xmpp/XmppPlugin.php

index b21afab461b58574df9852faab4c153b47d7746f..74e104d974b2785c5473f969ddc965571333abfb 100644 (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;
     }