provide a way to disable mailbox integration
This commit is contained in:
parent
2afd4c9d5a
commit
a0179235d2
9 changed files with 198 additions and 161 deletions
|
@ -270,15 +270,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'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue