Skip to content

Commit 0153f6d

Browse files
committed
hestiacp#1844 "public_html" field in "Custom document root" not load his state
regex in line 93 /\/home\/'.$v_username.'\/web\/([[:alnum:]].*)\/public_html\/([[:alnum:]].*)?/ Doesn't work properly when custom docroot is /home/user/web/hestiacp.com/public_html/public_html return is hestiacp.com/public_html as domain instead of hestiacp.com as domain and and public_html as folder
1 parent bd64dab commit 0153f6d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

web/edit/web/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@
9898
if(!empty($matches[2]))
9999
$v_custom_doc_folder = rtrim($matches[2], '/');
100100

101+
#1844 "public_html" field in "Custom document root" not load his state
102+
$public_html_custom_doc = strpos($v_custom_doc_domain,'/public_html');
103+
if($public_html_custom_doc > 0){
104+
$v_custom_doc_domain = substr($v_custom_doc_domain,0,$public_html_custom_doc);
105+
$v_custom_doc_folder = 'public_html';
106+
}
107+
101108
if($v_custom_doc_domain && !in_array($v_custom_doc_domain, $user_domains)) {
102109
$v_custom_doc_domain = '';
103110
$v_custom_doc_folder = '';

0 commit comments

Comments
 (0)