aboutsummaryrefslogtreecommitdiffstats
path: root/mod/network.php
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 /mod/network.php
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 'mod/network.php')
-rw-r--r--mod/network.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/mod/network.php b/mod/network.php
index 746206031..9061dff0f 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -95,18 +95,20 @@ function network_content(&$a, $update = 0) {
$jotplugins = '';
$jotnets = '';
+ $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
$mail_enabled = false;
$pubmail_enabled = false;
-
- $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
- intval(local_user())
- );
- if(count($r)) {
- $mail_enabled = true;
- if(intval($r[0]['pubmail']))
- $pubmail_enabled = true;
+ if(! $mail_disabled) {
+ $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
+ intval(local_user())
+ );
+ if(count($r)) {
+ $mail_enabled = true;
+ if(intval($r[0]['pubmail']))
+ $pubmail_enabled = true;
+ }
}
if($mail_enabled) {