Skip to content

Commit c8bf9c1

Browse files
committed
Adjust regex as it was to greedy
Better then the other solution
1 parent 0153f6d commit c8bf9c1

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

web/edit/web/index.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,13 @@
9090
$v_custom_doc_root = realpath($data[$v_domain]['CUSTOM_DOCROOT']) . DIRECTORY_SEPARATOR;
9191

9292
if(!empty($v_custom_doc_root) &&
93-
false !== preg_match('/\/home\/'.$v_username.'\/web\/([[:alnum:]].*)\/public_html\/([[:alnum:]].*)?/', $v_custom_doc_root, $matches) ) {
93+
false !== preg_match('/\/home\/'.$v_username.'\/web\/([[:alnum:]].*?)\/public_html\/([[:alnum:]].*)?/', $v_custom_doc_root, $matches) ) {
9494

9595
if(!empty($matches[1]))
9696
$v_custom_doc_domain = $matches[1];
9797

9898
if(!empty($matches[2]))
9999
$v_custom_doc_folder = rtrim($matches[2], '/');
100-
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-
}
107100

108101
if($v_custom_doc_domain && !in_array($v_custom_doc_domain, $user_domains)) {
109102
$v_custom_doc_domain = '';

0 commit comments

Comments
 (0)