Просмотр исходного кода

Merge branch 'mail-ux-fixes' into webmail-fixup

Kristan Kenney 7 лет назад
Родитель
Сommit
de8fa18d3d

+ 11 - 1
func/rebuild.sh

@@ -439,7 +439,7 @@ rebuild_dns_domain_conf() {
 
 # MAIL domain rebuild
 rebuild_mail_domain_conf() {
-
+    get_domain_values 'web'
     get_domain_values 'mail'
 
     if [[ "$domain" = *[![:ascii:]]* ]]; then
@@ -505,10 +505,20 @@ rebuild_mail_domain_conf() {
             del_mail_ssl_config
             add_mail_ssl_config
 
+            add_webmail_config '$WEB_SYSTEM' 'default.stpl'
+
             # Update counters
             update_object_value 'mail' 'DOMAIN' "$domain" '$SSL' "yes"
             U_MAIL_SSL=$((U_MAIL_SSL + 1))
         fi
+
+        # Add webmail configuration
+        if [ ! -z "$WEB_SYSTEM" ]; then 
+            add_webmail_config '$WEB_SYSTEM' 'default.tpl'
+        fi
+        if [ ! -z "PROXY_SYSTEM" ]; then 
+            add_webmail_config 'PROXY_SYSTEM' 'default.tpl'
+        fi
     fi
 
     # Rebuild domain accounts

+ 1 - 1
web/edit/mail/index.php

@@ -244,7 +244,7 @@ if ((!empty($_POST['save'])) && (!empty($_GET['domain'])) && (empty($_GET['accou
 
     // Delete Lets Encrypt support
     if (( $v_letsencrypt == 'yes' ) && (empty($_POST['v_letsencrypt'])) && (empty($_SESSION['error_msg']))) {
-        exec (HESTIA_CMD."v-delete-letsencrypt-domain ".$user." ".$v_domain." 'no' 'yes'", $output, $return_var);
+        exec (HESTIA_CMD."v-delete-letsencrypt-domain ".$user." ".$v_domain." ' ' 'yes'", $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);
         $v_ssl_crt = '';

+ 2 - 2
web/edit/web/index.php

@@ -339,7 +339,7 @@ if (!empty($_POST['save'])) {
 
     // Delete Lets Encrypt support
     if (( $v_letsencrypt == 'yes' ) && (empty($_POST['v_letsencrypt'])) && (empty($_SESSION['error_msg']))) {
-        exec (HESTIA_CMD."v-delete-letsencrypt-domain ".$user." ".$v_domain." 'no'", $output, $return_var);
+        exec (HESTIA_CMD."v-delete-letsencrypt-domain ".$user." ".$v_domain." ''", $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);
         $v_ssl_crt = '';
@@ -369,7 +369,7 @@ if (!empty($_POST['save'])) {
     // Add Lets Encrypt support
     if ((!empty($_POST['v_ssl'])) && ( $v_letsencrypt == 'no' ) && (!empty($_POST['v_letsencrypt'])) && empty($_SESSION['error_msg'])) {
         $l_aliases = str_replace("\n", ',', $v_aliases);
-        exec (HESTIA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '".$l_aliases."' 'no'", $output, $return_var);
+        exec (HESTIA_CMD."v-add-letsencrypt-domain ".$user." ".$v_domain." '".$l_aliases."' ''", $output, $return_var);
         check_return_code($return_var,$output);
         unset($output);
         $v_letsencrypt = 'yes';

+ 1 - 1
web/templates/admin/edit_mail_acc.html

@@ -205,7 +205,7 @@
                         </tr>
                         <?
                             list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
-                            $webmail = "http://mail.".$http_host."/";
+                            $webmail = "http://webmail.".$http_host."/";
                             if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
                         ?>
                         <tr>

+ 2 - 2
web/templates/admin/list_mail.html

@@ -14,7 +14,7 @@
               <td class="step-right">
                 <?
                   list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
-                  $webmail = "http://mail.".$http_host."/";
+                  $webmail = "http://webmail.".$http_host."/";
                   if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
                 ?>
                 <a class="vst" href="<?=$webmail?>" target="_blank"><?=__('open webmail')?> <i></i></a>
@@ -81,7 +81,7 @@
 
       <?
         list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
-        $webmail = "http://mail.".$http_host."/";
+        $webmail = "http://webmail.".$http_host."/";
         if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
 
         foreach ($data as $key => $value) {

+ 1 - 4
web/templates/admin/list_mail_acc.html

@@ -13,7 +13,7 @@
               <td class="step-right">
                 <?
                   list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
-                  $webmail = "http://mail.".$http_host."/";
+                  $webmail = "http://webmail.".$http_host."/";
                   if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
                 ?>
                 <a class="vst" href="<?=$webmail?>" target="_blank"><?=__('open webmail')?> <i></i></a>
@@ -56,9 +56,6 @@
     <div class="l-separator"></div>
     <!-- /.l-separator -->
     <div class="l-center units animated fadeIn">
-        <div class="l-unit header">
-            <div class="subtitle"><?=__('Listing')?>  <?=htmlentities($_GET['domain'])?></div>
-        </div>
         <div class="l-unit header">
             <div class="l-unit__col l-unit__col--left clearfix">
               <div class="text-center jump-small-top"></div>