mirror of
https://github.com/friendica/friendica
synced 2024-11-19 04:23:41 +00:00
don't show mailbox settings at all if disabled
This commit is contained in:
parent
3f25830076
commit
d7b5a606fb
2 changed files with 6 additions and 2 deletions
|
@ -115,6 +115,8 @@ function settings_post(&$a) {
|
|||
|
||||
|
||||
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
|
||||
if(get_config('system','dfrn_only'))
|
||||
$mail_disabled = 1;
|
||||
|
||||
if(! $mail_disabled) {
|
||||
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
|
||||
|
@ -355,6 +357,8 @@ function settings_content(&$a) {
|
|||
|
||||
|
||||
$mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
|
||||
if(get_config('system','dfrn_only'))
|
||||
$mail_disabled = 1;
|
||||
|
||||
if(! $mail_disabled) {
|
||||
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
|
||||
|
|
|
@ -94,10 +94,10 @@ $hide_wall
|
|||
<input type="submit" name="submit" class="settings-submit" value="$submit" />
|
||||
</div>
|
||||
|
||||
<h3 class="settings-heading">$h_imap</h3>
|
||||
{{ if $mail_disabled }}
|
||||
<div class="info-message">$mail_disabled</div>
|
||||
|
||||
{{ else }}
|
||||
<h3 class="settings-heading">$h_imap</h3>
|
||||
<p>$imap_desc</p>
|
||||
{{inc field_custom.tpl with $field=$imap_lastcheck }}{{endinc}}
|
||||
{{inc field_input.tpl with $field=$mail_server }}{{endinc}}
|
||||
|
|
Loading…
Reference in a new issue