diff --git a/src/Module/NodeInfo120.php b/src/Module/NodeInfo120.php index 56054d7b6..9d02a4b54 100644 --- a/src/Module/NodeInfo120.php +++ b/src/Module/NodeInfo120.php @@ -37,8 +37,6 @@ class NodeInfo120 extends BaseModule { $config = DI::config(); - $imap = (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only')); - $nodeinfo = [ 'version' => '2.0', 'software' => [ @@ -74,7 +72,7 @@ class NodeInfo120 extends BaseModule $nodeinfo['services']['inbound'][] = 'rss2.0'; $nodeinfo['services']['outbound'][] = 'atom1.0'; - if ($imap) { + if (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only')) { $nodeinfo['services']['inbound'][] = 'imap'; } diff --git a/src/Module/NodeInfo210.php b/src/Module/NodeInfo210.php index a95e37fa2..8512f6d07 100644 --- a/src/Module/NodeInfo210.php +++ b/src/Module/NodeInfo210.php @@ -37,8 +37,6 @@ class NodeInfo210 extends BaseModule { $config = DI::config(); - $imap = (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only')); - $nodeinfo = [ 'version' => '1.0', 'server' => [ @@ -74,7 +72,7 @@ class NodeInfo210 extends BaseModule $nodeinfo['services']['inbound'][] = 'rss2.0'; $nodeinfo['services']['outbound'][] = 'atom1.0'; - if ($imap) { + if (function_exists('imap_open') && !$config->get('system', 'imap_disabled') && !$config->get('system', 'dfrn_only')) { $nodeinfo['services']['inbound'][] = 'imap'; }