Jaap Marcus 4 лет назад
Родитель
Сommit
fb72c06266
2 измененных файлов с 9 добавлено и 7 удалено
  1. 1 1
      web/add/mail/index.php
  2. 8 6
      web/edit/mail/index.php

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

@@ -95,7 +95,7 @@ if (!empty($_POST['ok'])) {
         }
     }
     
-    if (!empty($_SESSION['IMAP_SYSTEM'])) {
+    if (!empty($_SESSION['IMAP_SYSTEM']) && !empty($_SESSION['WEBMAIL_SYSTEM'])) {
         if (empty($_POST['v_webmail'])) {
             if (empty($_SESSION['error_msg'])) {
             exec (HESTIA_CMD."v-delete-mail-domain-webmail ".$user." ".$v_domain." yes", $output, $return_var);

+ 8 - 6
web/edit/mail/index.php

@@ -236,12 +236,14 @@ if ((!empty($_POST['save'])) && (!empty($_GET['domain'])) && (empty($_GET['accou
         }
     }
     
-    if (empty($_POST['v_webmail'])) {
-        if (empty($_SESSION['error_msg'])) {
-        exec (HESTIA_CMD."v-delete-mail-domain-webmail ".$user." ".$v_domain." yes", $output, $return_var);
-        check_return_code($return_var,$output);
-        $v_webmail = "";
-        unset($output);
+    if (!empty($_SESSION['IMAP_SYSTEM']) && !empty($_SESSION['WEBMAIL_SYSTEM'])) {
+        if (empty($_POST['v_webmail'])) {
+            if (empty($_SESSION['error_msg'])) {
+            exec (HESTIA_CMD."v-delete-mail-domain-webmail ".$user." ".$v_domain." yes", $output, $return_var);
+            check_return_code($return_var,$output);
+            $v_webmail = "";
+            unset($output);
+            }
         }
     }