]> git.mxchange.org Git - friendica.git/blobdiff - include/diaspora.php
make 'PHP "register_argc_argv"' easier to translate, may require fix for po2php
[friendica.git] / include / diaspora.php
index 9951cf42378967f01ade26ee2a16d6e466edb24e..06df9c24a4513d2ddc27cd5de1c13a8e54a67db6 100755 (executable)
@@ -10,8 +10,10 @@ require_once('include/queue_fn.php');
 function diaspora_dispatch_public($msg) {
 
        $enabled = intval(get_config('system','diaspora_enabled'));
-       if(! $enabled)
+       if(! $enabled) {
+               logger('mod-diaspora: disabled');
                return;
+       }
 
        $r = q("SELECT `user`.* FROM `user` WHERE `user`.`uid` IN ( SELECT `contact`.`uid` FROM `contact` WHERE `contact`.`network` = '%s' AND `contact`.`addr` = '%s' ) AND `account_expired` = 0 ",
                dbesc(NETWORK_DIASPORA),
@@ -34,8 +36,10 @@ function diaspora_dispatch($importer,$msg) {
        $ret = 0;
 
        $enabled = intval(get_config('system','diaspora_enabled'));
-       if(! $enabled)
+       if(! $enabled) {
+               logger('mod-diaspora: disabled');
                return;
+       }
 
        // php doesn't like dashes in variable names
 
@@ -2279,6 +2283,11 @@ function diaspora_send_mail($item,$owner,$contact) {
 
 function diaspora_transmit($owner,$contact,$slap,$public_batch) {
 
+       $enabled = intval(get_config('system','diaspora_enabled'));
+       if(! $enabled) {
+               return 200;
+       }
+
        $a = get_app();
        $logid = random_string(4);
        $dest_url = (($public_batch) ? $contact['batch'] : $contact['notify']);