diff --git a/ChangeLog b/ChangeLog
index 43dc578e49b..a3f9db52ac9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -44,7 +44,9 @@ For developers:
- New: Add option MAIN_MOTD_SETUPPAGE to add a content onto setup page. Also content for
MAIN_MOTD_SETUPPAGE, MAIN_MOTD_SETUPPAGE, MAIN_HOME now accept "|langfile" into translation
key to use a specific language file.
-
+- New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables.
+ Fix also several bugs with old code.
+
***** ChangeLog for 3.4 compared to 3.3.2 *****
For users:
diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php
index 681b108e1b8..3386e3aa135 100644
--- a/htdocs/admin/system/constall.php
+++ b/htdocs/admin/system/constall.php
@@ -183,7 +183,6 @@ foreach($configfileparameters as $key)
print "
";
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
- else if ($newkey == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT_ALT');
else print ${$newkey};
if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
print " | ";
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index b32ddf573bd..59f3b3f3856 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -302,7 +302,6 @@ foreach($configfileparameters as $key => $value)
print "";
if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i','*',${$newkey});
else if ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
- else if ($newkey == 'dolibarr_main_url_root_alt' && preg_match('/__auto__/',${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT_ALT');
else print ${$newkey};
if ($newkey == 'dolibarr_main_url_root' && $newkey != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
print " | ";
diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php
index 3aae9b0f009..133dd247459 100644
--- a/htdocs/admin/tools/update.php
+++ b/htdocs/admin/tools/update.php
@@ -75,7 +75,7 @@ if (GETPOST('action','alpha')=='install')
$result=dol_move_uploaded_file($_FILES['fileinstall']['tmp_name'],$newfile,1,0,$_FILES['fileinstall']['error']);
if ($result > 0)
{
- $documentrootalt=DOL_DOCUMENT_ROOT_ALT;
+ $documentrootalt=DOL_DOCUMENT_ROOT.'/extensions';
$result=dol_uncompress($newfile,$documentrootalt);
if (! empty($result['error']))
{
@@ -95,7 +95,7 @@ if (GETPOST('action','alpha')=='install')
* View
*/
-$dirins=DOL_DOCUMENT_ROOT_ALT;
+$dirins=DOL_DOCUMENT_ROOT.'/extensions';
$dirins_ok=(is_dir($dirins));
$wikihelp='EN:Installation_-_Upgrade|FR:Installation_-_Mise_à_jour|ES:Instalación_-_Actualización';
@@ -141,7 +141,7 @@ print ''.$langs->trans("StepNb",3).': ';
print $langs->trans("UnpackPackageInDolibarrRoot",$dolibarrroot).'
';
if (! empty($conf->global->MAIN_ONLINE_INSTALL_MODULE))
{
- if ($dirins_ok && $dirins != 'DOL_DOCUMENT_ROOT_ALT')
+ if ($dirins_ok)
{
print '