[enh] change the name of some variables

This commit is contained in:
Benjamin Sonntag 2018-06-22 17:37:04 +02:00
parent 2ca592aa8a
commit 5079aa2e03
8 changed files with 50 additions and 38 deletions

View File

@ -104,7 +104,7 @@ if ( $val['enabled']) {
<?php __("Here are some configuration information you will need to configure your FTP application.");?> <?php __("Here are some configuration information you will need to configure your FTP application.");?>
<ul> <ul>
<li><?php echo '<b>'._("Server:").'</b> '.$ftp->srv_name; ?></li> <li><?php echo '<b>'._("Server:").'</b> '.$ftp->srv_proftpd; ?></li>
<li><?php echo '<b>'._("FTP mode for data transfer:").'</b> '._("passive");?></li> <li><?php echo '<b>'._("FTP mode for data transfer:").'</b> '._("passive");?></li>
<li><?php echo '<b>'._("User/password:").'</b> '._("the one you specified when you created the account. You can edit them in the panel.");?></li> <li><?php echo '<b>'._("User/password:").'</b> '._("the one you specified when you created the account. You can edit them in the panel.");?></li>
</ul> </ul>

View File

@ -193,11 +193,11 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<?php __("Which protocol shall you use?"); ?> <?php __("Which protocol shall you use?"); ?>
<div id="accordion-mailout"> <div id="accordion-mailout">
<?php if ($mail->srv_submission) { ?> <?php if ($mail->srv_postfix) { ?>
<h4><?php __("Submission");?></h4> <h4><?php __("Submission");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_submission); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_postfix); ?></li>
<li><b><?php __("Username: ");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>");?></li> <li><b><?php __("Username: ");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>");?></li>
<li><b><?php __("Port: ");?></b> 587</li> <li><b><?php __("Port: ");?></b> 587</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
@ -206,11 +206,11 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
</ul> </ul>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($mail->srv_smtp) { ?> <?php if ($mail->srv_postfix) { ?>
<h4><?php __("SMTP");?></h4> <h4><?php __("SMTP");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_smtp); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_postfix); ?></li>
<li><b><?php __("Username: ");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>");?></li> <li><b><?php __("Username: ");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>");?></li>
<li><b><?php __("Port: ");?></b> 25</li> <li><b><?php __("Port: ");?></b> 25</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
@ -219,11 +219,11 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
</ul> </ul>
</div> </div>
<?php } ?> <?php } ?>
<?php if ($mail->srv_smtps) { ?> <?php if ($mail->srv_postfix) { ?>
<h4><?php __("SMTPS");?></h4> <h4><?php __("SMTPS");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_smtps); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_postfix); ?></li>
<li><b><?php __("Username: ");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>");?></li> <li><b><?php __("Username: ");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>");?></li>
<li><b><?php __("Port: ");?></b> 465</li> <li><b><?php __("Port: ");?></b> 465</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
@ -243,7 +243,7 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<h4><?php __("IMAP");?></h4> <h4><?php __("IMAP");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_imap); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_dovecot); ?></li>
<li><b><?php __("Port: ");?></b> 143</li> <li><b><?php __("Port: ");?></b> 143</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
<li><b><?php __("Authentication method: ");?></b><?php __("Normal password")?></li> <li><b><?php __("Authentication method: ");?></b><?php __("Normal password")?></li>
@ -254,7 +254,7 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<h4><?php __("IMAPS");?></h4> <h4><?php __("IMAPS");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_imaps); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_dovecot); ?></li>
<li><b><?php __("Port: ");?></b> 993</li> <li><b><?php __("Port: ");?></b> 993</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
<li><b><?php __("Authentication method: ")?></b><?php __("Normal password")?></li> <li><b><?php __("Authentication method: ")?></b><?php __("Normal password")?></li>
@ -265,7 +265,7 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<h4><?php __("POP3");?></h4> <h4><?php __("POP3");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_pop3); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_dovecot); ?></li>
<li><b><?php __("Port: ");?></b> 110</li> <li><b><?php __("Port: ");?></b> 110</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
<li><b><?php __("Authentication method: ");?></b><?php __("Normal password")?></li> <li><b><?php __("Authentication method: ");?></b><?php __("Normal password")?></li>
@ -276,7 +276,7 @@ if (date("Y-m-d")==substr($val["lastlogin"],0,10)) echo substr($val["lastlogin"]
<h4><?php __("POP3S");?></h4> <h4><?php __("POP3S");?></h4>
<div> <div>
<ul> <ul>
<li><b><?php __("Server name: ");?></b> <?php __($mail->srv_pop3s); ?></li> <li><b><?php __("Server name: ");?></b> <?php __($mail->srv_dovecot); ?></li>
<li><b><?php __("Port: ");?></b> 995</li> <li><b><?php __("Port: ");?></b> 995</li>
<li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li> <li><b><?php __("Authentication: ");?></b><?php __("Yes")?></li>
<li><b><?php __("Authentication method: ");?></b><?php __("Normal password")?></li> <li><b><?php __("Authentication method: ");?></b><?php __("Normal password")?></li>

View File

@ -53,7 +53,7 @@ echo "<?xml version='1.0' encoding='UTF-8'?> \n";
<Action>settings</Action> <Action>settings</Action>
<Protocol> <Protocol>
<Type>IMAP</Type> <Type>IMAP</Type>
<Server><?php echo $mail->srv_imaps;?></Server> <Server><?php echo $mail->srv_dovecot; ?></Server>
<Port>993</Port> <Port>993</Port>
<LoginName><?php echo $matches[0];?></LoginName> <LoginName><?php echo $matches[0];?></LoginName>
<DomainName><?php echo $emailDomain[1];?></DomainName> <DomainName><?php echo $emailDomain[1];?></DomainName>
@ -63,7 +63,7 @@ echo "<?xml version='1.0' encoding='UTF-8'?> \n";
</Protocol> </Protocol>
<Protocol> <Protocol>
<Type>SMTP</Type> <Type>SMTP</Type>
<Server><?php echo $mail->srv_smtps;?></Server> <Server><?php echo $mail->srv_postfix; ?></Server>
<Port>587</Port> <Port>587</Port>
<SPA>off</SPA> <SPA>off</SPA>
<SSL>on</SSL> <SSL>on</SSL>

View File

@ -44,28 +44,28 @@ if (empty($emailDomain)) die(_('Error: Empty $emailDomain'));
<displayName><?php echo $L_FQDN ?></displayName> <displayName><?php echo $L_FQDN ?></displayName>
<displayShortName><?php echo $L_FQDN ?></displayShortName> <displayShortName><?php echo $L_FQDN ?></displayShortName>
<incomingServer type="imap"> <incomingServer type="imap">
<hostname><?php echo $mail->srv_imap ;?></hostname> <hostname><?php echo $mail->srv_dovecot ;?></hostname>
<port>993</port> <port>143</port>
<socketType>SSL</socketType> <socketType>STARTTLS</socketType>
<authentication>password-cleartext</authentication> <authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username> <username>%EMAILADDRESS%</username>
</incomingServer> </incomingServer>
<incomingServer type="pop3"> <incomingServer type="pop3">
<hostname><?php echo $mail->srv_imaps;?></hostname> <hostname><?php echo $mail->srv_dovecot;?></hostname>
<port>995</port> <port>110</port>
<socketType>SSL</socketType> <socketType>STARTTLS</socketType>
<authentication>password-cleartext</authentication> <authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username> <username>%EMAILADDRESS%</username>
</incomingServer> </incomingServer>
<outgoingServer type="smtp"> <outgoingServer type="smtp">
<hostname><?php echo $mail->srv_smtp;?></hostname> <hostname><?php echo $mail->srv_postfix;?></hostname>
<port>587</port> <port>587</port>
<socketType>STARTTLS</socketType> <socketType>STARTTLS</socketType>
<username>%EMAILADDRESS%</username> <username>%EMAILADDRESS%</username>
<authentication>password-cleartext</authentication> <authentication>password-cleartext</authentication>
</outgoingServer> </outgoingServer>
<outgoingServer type="smtp"> <outgoingServer type="smtp">
<hostname><?php echo $mail->srv_smtps;?></hostname> <hostname><?php echo $mail->srv_postfix;?></hostname>
<port>465</port> <port>465</port>
<socketType>SSL</socketType> <socketType>SSL</socketType>
<authentication>password-cleartext</authentication> <authentication>password-cleartext</authentication>

View File

@ -25,7 +25,7 @@
*/ */
class m_ftp { class m_ftp {
var $srv_name; var $srv_proftpd;
/** /**
@ -33,7 +33,7 @@ class m_ftp {
*/ */
function m_ftp() { function m_ftp() {
global $L_FQDN; global $L_FQDN;
$this->srv_name = variable_get('ftp_human_name', $L_FQDN, 'Human name for FTP server', array('desc' => 'Name', 'type' => 'string')); $this->srv_proftpd = variable_get('fqdn_proftpd', $L_FQDN, 'Human name for FTP server', array('desc' => 'Name', 'type' => 'string'));
} }

View File

@ -61,13 +61,8 @@ class m_mail {
var $total; var $total;
// Human server name for help // Human server name for help
var $srv_submission; var $srv_postfix;
var $srv_smtp; var $srv_dovecot;
var $srv_smtps;
var $srv_imap;
var $srv_imaps;
var $srv_pop3;
var $srv_pop3s;
var $cache_domain_mail_size = array(); var $cache_domain_mail_size = array();
var $enum_domains = array(); var $enum_domains = array();
@ -77,13 +72,8 @@ class m_mail {
*/ */
function m_mail() { function m_mail() {
global $L_FQDN; global $L_FQDN;
$this->srv_submission = variable_get('mail_human_submission', $L_FQDN, 'Human name for mail server (submission protocol), leave empty to disable help', array('desc' => 'Name', 'type' => 'string')); $this->srv_postfix = variable_get('fqdn_postfix', $L_FQDN, 'FQDN name for humans for smtp services', array('desc' => 'Name', 'type' => 'string'));
$this->srv_smtp = variable_get('mail_human_smtp', $L_FQDN, 'Human name for mail server (SMTP protocol), leave empty to disable help', array('desc' => 'Name', 'type' => 'string')); $this->srv_dovecot = variable_get('fqdn_dovecot', $L_FQDN, 'FQDN name for humans for pop/imap services', array('desc' => 'Name', 'type' => 'string'));
$this->srv_smtps = variable_get('mail_human_smtps', $L_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', $L_FQDN, 'Human name for IMAP mail server', array('desc' => 'Name', 'type' => 'string'));
$this->srv_imaps = variable_get('mail_human_imaps', $L_FQDN, 'Human name for IMAPS mail server', array('desc' => 'Name', 'type' => 'string'));
$this->srv_pop3 = variable_get('mail_human_pop3', $L_FQDN, 'Human name for POP3 mail server', array('desc' => 'Name', 'type' => 'string'));
$this->srv_pop3s = variable_get('mail_human_pop3s', $L_FQDN, 'Human name for POP3s mail server', array('desc' => 'Name', 'type' => 'string'));
} }

View File

@ -788,7 +788,6 @@ CREATE TABLE `certificates` (
KEY `uid` (`uid`) KEY `uid` (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT IGNORE INTO defquotas VALUES ('ssl', 0, 'default');
-- make it re-exec-proof -- make it re-exec-proof

View File

@ -1,4 +1,6 @@
-- upgrade to merge alternc-ssl into alternc + change the way we work on SSL
DROP TABLE `certif_alias`; DROP TABLE `certif_alias`;
ALTER TABLE `certificates` DROP `shared`, DROP `ssl_action`, DROP `ssl_result`; ALTER TABLE `certificates` DROP `shared`, DROP `ssl_action`, DROP `ssl_result`;
@ -35,3 +37,24 @@ DELETE sd1 FROM sub_domaines sd1, sub_domaines sd2 WHERE sd1.id > sd2.id AND sd1
-- Regenerate all vhost -- Regenerate all vhost
UPDATE `sub_domaines` SET `web_action` = 'UPDATE'; UPDATE `sub_domaines` SET `web_action` = 'UPDATE';
-- change some variable names :
UPDATE variable
SET name="fqdn_dovecot",comment="FQDN name for humans for pop/imap services"
WHERE name="mail_human_imap";
UPDATE variable
SET name="fqdn_postfix",comment="FQDN name for humans for smtp services"
WHERE name="mail_human_smtp";
UPDATE variable
SET name="fqdn_proftpd",comment="FQDN name for humans for ftp services"
WHERE name="mail_human_ftp";
DELETE FROM variable WHERE name IN (
'mail_human_imaps','mail_human_pop3','mail_human_pop3s',
'mail_human_smtps','mail_human_submission'
);