X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fnotifier.php;h=b009cc8700defafa6ba3ba0074c0f32eabe52b28;hb=7d455a039552049de82704a20ccda9fe05c173d4;hp=80f0e67c71cc01ec34a70f4c252fd45f77d3c360;hpb=ab099e91028122dfb6b10cf9510b1b061f6f547f;p=friendica.git diff --git a/include/notifier.php b/include/notifier.php index 80f0e67c71..b009cc8700 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -20,6 +20,8 @@ function notifier_run($argv, $argc){ require_once('include/items.php'); require_once('include/bbcode.php'); + load_hooks(); + if($argc < 3) return; @@ -270,15 +272,20 @@ function notifier_run($argv, $argc){ // If this is a public message and pubmail is set on the parent, include all your email contacts - if((! strlen($parent_item['allow_cid'])) && (! strlen($parent_item['allow_gid'])) && (! strlen($parent_item['deny_cid'])) && (! strlen($parent_item['deny_gid'])) - && (intval($parent_item['pubmail']))) { - $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `network` = '%s'", - intval($uid), - dbesc(NETWORK_MAIL) - ); - if(count($r)) { - foreach($r as $rr) - $recipients[] = $rr['id']; + $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1); + + if(! $mail_disabled) { + if((! strlen($parent_item['allow_cid'])) && (! strlen($parent_item['allow_gid'])) + && (! strlen($parent_item['deny_cid'])) && (! strlen($parent_item['deny_gid'])) + && (intval($parent_item['pubmail']))) { + $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `network` = '%s'", + intval($uid), + dbesc(NETWORK_MAIL) + ); + if(count($r)) { + foreach($r as $rr) + $recipients[] = $rr['id']; + } } }