Sfoglia il codice sorgente

Adjust regex as it was to greedy

Better then the other solution
Jaap Marcus 4 anni fa
parent
commit
c8bf9c1766
1 ha cambiato i file con 1 aggiunte e 8 eliminazioni
  1. 1 8
      web/edit/web/index.php

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

@@ -90,20 +90,13 @@ if(!empty($data[$v_domain]['CUSTOM_DOCROOT']))
     $v_custom_doc_root = realpath($data[$v_domain]['CUSTOM_DOCROOT']) . DIRECTORY_SEPARATOR;
 
 if(!empty($v_custom_doc_root) &&
-    false !== preg_match('/\/home\/'.$v_username.'\/web\/([[:alnum:]].*)\/public_html\/([[:alnum:]].*)?/', $v_custom_doc_root, $matches) ) {
+    false !== preg_match('/\/home\/'.$v_username.'\/web\/([[:alnum:]].*?)\/public_html\/([[:alnum:]].*)?/', $v_custom_doc_root, $matches) ) {
 
     if(!empty($matches[1]))
         $v_custom_doc_domain = $matches[1];
 
     if(!empty($matches[2]))
         $v_custom_doc_folder = rtrim($matches[2], '/');
-
-    #1844 "public_html" field in "Custom document root" not load his state
-    $public_html_custom_doc = strpos($v_custom_doc_domain,'/public_html');
-    if($public_html_custom_doc > 0){
-        $v_custom_doc_domain = substr($v_custom_doc_domain,0,$public_html_custom_doc);
-        $v_custom_doc_folder = 'public_html';
-    }
     
     if($v_custom_doc_domain && !in_array($v_custom_doc_domain, $user_domains)) {
         $v_custom_doc_domain = '';