aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-04-18 20:20:04 -0700
committerFriendika <info@friendika.com>2011-04-18 20:20:04 -0700
commita0179235d2d4672ba9dc79b33505555766b3228a (patch)
tree4c4a8f11a72c4d86ca17335639ce8ce6dd43c829 /include
parent2afd4c9d5a5b0543d7de3fd8b5428fbb91a3898b (diff)
downloadvolse-hubzilla-a0179235d2d4672ba9dc79b33505555766b3228a.tar.gz
volse-hubzilla-a0179235d2d4672ba9dc79b33505555766b3228a.tar.bz2
volse-hubzilla-a0179235d2d4672ba9dc79b33505555766b3228a.zip
provide a way to disable mailbox integration
Diffstat (limited to 'include')
-rw-r--r--include/notifier.php23
-rw-r--r--include/poller.php5
2 files changed, 19 insertions, 9 deletions
diff --git a/include/notifier.php b/include/notifier.php
index 80f0e67c7..4cc6d7a99 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -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'];
+ }
}
}
diff --git a/include/poller.php b/include/poller.php
index 4373dc081..b5639e034 100644
--- a/include/poller.php
+++ b/include/poller.php
@@ -287,6 +287,11 @@ function poller_run($argv, $argc){
$xml = fetch_url($contact['poll']);
}
elseif($contact['network'] === NETWORK_MAIL) {
+
+ $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
+ if($mail_disabled)
+ continue;
+
$mbox = null;
$x = q("SELECT `prvkey` FROM `user` WHERE `uid` = %d LIMIT 1",
intval($importer_uid)