diff --git a/src/Module/Admin/Site.php b/src/Module/Admin/Site.php index af276a3f4..36e43a6df 100644 --- a/src/Module/Admin/Site.php +++ b/src/Module/Admin/Site.php @@ -560,7 +560,9 @@ class Site extends BaseAdmin '$no_regfullname' => ['no_regfullname', DI::l10n()->t('No Fullname check'), DI::config()->get('system', 'no_regfullname'), DI::l10n()->t('Allow users to register without a space between the first name and the last name in their full name.')], '$community_page_style' => ['community_page_style', DI::l10n()->t('Community pages for visitors'), DI::config()->get('system', 'community_page_style'), DI::l10n()->t('Which community pages should be available for visitors. Local users always see both pages.'), $community_page_style_choices], '$max_author_posts_community_page' => ['max_author_posts_community_page', DI::l10n()->t('Posts per user on community page'), DI::config()->get('system', 'max_author_posts_community_page'), DI::l10n()->t('The maximum number of posts per user on the community page. (Not valid for "Global Community")')], + '$mail_able' => function_exists('imap_open'), '$mail_enabled' => ['mail_enabled', DI::l10n()->t('Enable Mail support'), !DI::config()->get('system', 'imap_disabled', !function_exists('imap_open')), DI::l10n()->t('Enable built-in mail support to poll IMAP folders and to reply via mail.')], + '$mail_not_able' => DI::l10n()->t('Mail support can\'t be enabled because the PHP IMAP module is not installed.'), '$ostatus_enabled' => ['ostatus_enabled', DI::l10n()->t('Enable OStatus support'), !DI::config()->get('system', 'ostatus_disabled'), DI::l10n()->t('Enable built-in OStatus (StatusNet, GNU Social etc.) compatibility. All communications in OStatus are public.')], '$diaspora_able' => $diaspora_able, '$diaspora_not_able' => DI::l10n()->t('Diaspora support can\'t be enabled because Friendica was installed into a sub directory.'), diff --git a/view/templates/admin/site.tpl b/view/templates/admin/site.tpl index d69d920a0..a35d1d97a 100644 --- a/view/templates/admin/site.tpl +++ b/view/templates/admin/site.tpl @@ -56,7 +56,15 @@ {{include file="field_select.tpl" field=$community_page_style}} {{include file="field_input.tpl" field=$max_author_posts_community_page}} - {{include file="field_checkbox.tpl" field=$mail_enabled}} + {{if $mail_able}} + {{include file="field_checkbox.tpl" field=$mail_enabled}} + {{else}} +
+ + {{$mail_not_able}} +
+ {{/if}} + {{include file="field_checkbox.tpl" field=$ostatus_enabled}} {{if $diaspora_able}} @@ -64,7 +72,7 @@ {{else}}
- {{$diaspora_not_able}} + {{$diaspora_not_able}}
{{/if}} {{include file="field_input.tpl" field=$global_directory}} diff --git a/view/theme/frio/templates/admin/site.tpl b/view/theme/frio/templates/admin/site.tpl index 2432e271a..c96af9376 100644 --- a/view/theme/frio/templates/admin/site.tpl +++ b/view/theme/frio/templates/admin/site.tpl @@ -135,7 +135,15 @@ {{include file="field_select.tpl" field=$community_page_style}} {{include file="field_input.tpl" field=$max_author_posts_community_page}} - {{include file="field_checkbox.tpl" field=$mail_enabled}} + {{if $mail_able}} + {{include file="field_checkbox.tpl" field=$mail_enabled}} + {{else}} +
+ + {{$mail_not_able}} +
+ {{/if}} + {{include file="field_checkbox.tpl" field=$ostatus_enabled}} {{if $diaspora_able}} @@ -143,7 +151,7 @@ {{else}}
- {{$diaspora_not_able}} + {{$diaspora_not_able}}
{{/if}} {{include file="field_input.tpl" field=$global_directory}}