Merge pull request #11597 from atm-florianm/8.0-FIX_missing_prefix_replacement_in_database_function_initialization

FIX issue #9300: install error with PostgreSQL using custom table prefix
This commit is contained in:
Laurent Destailleur 2019-07-30 15:38:22 +02:00 committed by GitHub
commit 5ef5c5521f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -451,6 +451,11 @@ if ($action == "set")
$buffer=trim($buffer);
if ($buffer)
{
// Replace the prefix in table names
if ($dolibarr_main_db_prefix != 'llx_')
{
$buffer=preg_replace('/llx_/i',$dolibarr_main_db_prefix,$buffer);
}
dolibarr_install_syslog("step2: request: " . $buffer);
print "<!-- Insert line : ".$buffer."<br>-->\n";
$resql=$db->query($buffer,0,'dml');