]> git.mxchange.org Git - friendica.git/blobdiff - include/notifier.php
missing location after editor was consolidated
[friendica.git] / include / notifier.php
index 80f0e67c71cc01ec34a70f4c252fd45f77d3c360..b009cc8700defafa6ba3ba0074c0f32eabe52b28 100644 (file)
@@ -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'];
+                       }
                }
        }