|
@@ -757,19 +757,23 @@ if (!empty($_POST['save'])) {
|
|
|
unset($_POST['v-custom-doc-domain'], $_POST['v-custom-doc-folder']);
|
|
unset($_POST['v-custom-doc-domain'], $_POST['v-custom-doc-folder']);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if ( !empty($_POST['v-custom-doc-domain']) && !empty($_POST['v_custom_doc_root_check']) && $v_custom_doc_root_prepath.$v_custom_doc_domain.'/public_html'.$v_custom_doc_folder != $v_custom_doc_root || ($_POST['v-custom-doc-domain'] == $v_domain && !empty($_POST['v-custom-doc-folder']))){
|
|
|
|
|
-
|
|
|
|
|
- $v_custom_doc_domain = escapeshellarg($_POST['v-custom-doc-domain']);
|
|
|
|
|
- $v_custom_doc_folder = escapeshellarg($_POST['v-custom-doc-folder']);
|
|
|
|
|
-
|
|
|
|
|
- exec(HESTIA_CMD."v-change-web-domain-docroot ".$v_username." ".escapeshellarg($v_domain)." ".$v_custom_doc_domain." ".$v_custom_doc_folder, $output, $return_var);
|
|
|
|
|
- check_return_code($return_var,$output);
|
|
|
|
|
- unset($output);
|
|
|
|
|
- $v_custom_doc_root = 1;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if ( !empty($_POST['v-custom-doc-domain']) && !empty($_POST['v_custom_doc_root_check']) && $v_custom_doc_root_prepath.$v_custom_doc_domain.'/public_html'.$v_custom_doc_folder != $v_custom_doc_root){
|
|
|
|
|
+ if($_POST['v-custom-doc-domain'] == $v_domain && empty($_POST['v-custom-doc-folder'])){
|
|
|
|
|
+ exec(HESTIA_CMD."v-change-web-domain-docroot ".$v_username." ".escapeshellarg($v_domain)." default", $output, $return_var);
|
|
|
|
|
+ check_return_code($return_var,$output);
|
|
|
|
|
+ unset($output);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $v_custom_doc_domain = escapeshellarg($_POST['v-custom-doc-domain']);
|
|
|
|
|
+ $v_custom_doc_folder = escapeshellarg($_POST['v-custom-doc-folder']);
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+ exec(HESTIA_CMD."v-change-web-domain-docroot ".$v_username." ".escapeshellarg($v_domain)." ".$v_custom_doc_domain." ".$v_custom_doc_folder, $output, $return_var);
|
|
|
|
|
+ check_return_code($return_var,$output);
|
|
|
|
|
+ unset($output);
|
|
|
|
|
+ $v_custom_doc_root = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ }else{
|
|
|
|
|
+ unset($v_custom_doc_root);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
// Restart web server
|
|
// Restart web server
|
|
|
if (!empty($restart_web) && (empty($_SESSION['error_msg']))) {
|
|
if (!empty($restart_web) && (empty($_SESSION['error_msg']))) {
|