disable help texts if empty, partly (missing IMAP/POP)

This commit is contained in:
Antoine Beaupr�� 2014-06-18 18:55:00 +00:00
parent 73606b8e26
commit 8113d2b866
2 changed files with 9 additions and 3 deletions

View File

@ -202,6 +202,7 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<?php __("Which protocol shall you use?"); ?>
<div id="accordion-mailout">
<?php if ($mail->srv_submission) { ?>
<h4><?php __("Submission");?></h4>
<div>
<ul>
@ -213,6 +214,8 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<li><b><?php __("Connection security:");?></b> STARTTLS</li>
</ul>
</div>
<?php } ?>
<?php if ($mail->srv_smtp) { ?>
<h4><?php __("SMTP");?></h4>
<div>
<ul>
@ -224,6 +227,8 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<li><b><?php __("Connection security:");?></b> STARTTLS</li>
</ul>
</div>
<?php } ?>
<?php if ($mail->srv_smtps) { ?>
<h4><?php __("SMTPS");?></h4>
<div>
<ul>
@ -235,6 +240,7 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<li><b><?php __("Connection security:");?></b> SSL</li>
</ul>
</div>
<?php } ?>
</div><!-- accordion-mailout -->
</div><!-- tabs-mailhelp-out -->

View File

@ -82,9 +82,9 @@ class m_mail {
* Constructeur
*/
function m_mail() {
$this->srv_submission = variable_get('mail_human_submission', '%%FQDN%%','Human name for mail server (submission protocol)', array('desc'=>'Name','type'=>'string'));
$this->srv_smtp = variable_get('mail_human_smtp', '%%FQDN%%','Human name for mail server (SMTP protocol)', array('desc'=>'Name','type'=>'string'));
$this->srv_smtps = variable_get('mail_human_smtps', '%%FQDN%%','Human name for mail server (SMTPS protocol)', array('desc'=>'Name','type'=>'string'));
$this->srv_submission = variable_get('mail_human_submission', '%%FQDN%%','Human name for mail server (submission protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string'));
$this->srv_smtp = variable_get('mail_human_smtp', '%%FQDN%%','Human name for mail server (SMTP protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string'));
$this->srv_smtps = variable_get('mail_human_smtps', '%%FQDN%%','Human name for mail server (SMTPS protocol), leave empty to disable help', array('desc'=>'Name','type'=>'string'));
$this->srv_imap = variable_get('mail_human_imap', '%%FQDN%%','Human name for IMAP mail server', array('desc'=>'Name','type'=>'string'));
$this->srv_imaps = variable_get('mail_human_imaps', '%%FQDN%%','Human name for IMAPS mail server', array('desc'=>'Name','type'=>'string'));
$this->srv_pop3 = variable_get('mail_human_pop3', '%%FQDN%%','Human name for POP3 mail server', array('desc'=>'Name','type'=>'string'));