Fix: Upgrade fail with very old versions
This commit is contained in:
parent
df5f9c6112
commit
195bebfc3e
@ -67,6 +67,8 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
|||||||
$result=include_once($conffile); // Load conf file
|
$result=include_once($conffile); // Load conf file
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
|
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility
|
||||||
|
|
||||||
// Remove last / or \ on directories or url value
|
// Remove last / or \ on directories or url value
|
||||||
if (! empty($dolibarr_main_document_root) && ! ereg('^[\\\/]+$',$dolibarr_main_document_root)) $dolibarr_main_document_root=ereg_replace('[\\\/]+$','',$dolibarr_main_document_root);
|
if (! empty($dolibarr_main_document_root) && ! ereg('^[\\\/]+$',$dolibarr_main_document_root)) $dolibarr_main_document_root=ereg_replace('[\\\/]+$','',$dolibarr_main_document_root);
|
||||||
if (! empty($dolibarr_main_url_root) && ! ereg('^[\\\/]+$',$dolibarr_main_url_root)) $dolibarr_main_url_root=ereg_replace('[\\\/]+$','',$dolibarr_main_url_root);
|
if (! empty($dolibarr_main_url_root) && ! ereg('^[\\\/]+$',$dolibarr_main_url_root)) $dolibarr_main_url_root=ereg_replace('[\\\/]+$','',$dolibarr_main_url_root);
|
||||||
@ -103,6 +105,7 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile))
|
|||||||
$includeconferror='ErrorBadFormatForConfFile';
|
$includeconferror='ErrorBadFormatForConfFile';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_';
|
||||||
define('MAIN_DB_PREFIX',(isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefix:''));
|
define('MAIN_DB_PREFIX',(isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefix:''));
|
||||||
define('DOL_DATA_ROOT',(isset($dolibarr_main_data_root)?$dolibarr_main_data_root:''));
|
define('DOL_DATA_ROOT',(isset($dolibarr_main_data_root)?$dolibarr_main_data_root:''));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user