Skip to content

Commit

Permalink
QUAL Update inc.php (#29822)
Browse files Browse the repository at this point in the history
Adaptation of detect_dolibarr_main_data_root to handle more cases, especially when servers don't have htdocs

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
  • Loading branch information
clementgde and eldy authored Jul 1, 2024
1 parent b918588 commit 46435ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions htdocs/install/inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,7 @@ function detect_dolibarr_main_document_root()
*/
function detect_dolibarr_main_data_root($dolibarr_main_document_root)
{
$dolibarr_main_data_root = preg_replace("/\/htdocs$/", "", $dolibarr_main_document_root);
$dolibarr_main_data_root .= "/documents";
$dolibarr_main_data_root = preg_replace("/\/[^\/]+$/", "/documents", $dolibarr_main_document_root);
return $dolibarr_main_data_root;
}

Expand Down

0 comments on commit 46435ce

Please sign in to comment.