mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts: htdocs/filefunc.inc.php
This commit is contained in:
@@ -152,6 +152,7 @@ class DoliDBPgsql extends DoliDB
|
||||
*/
|
||||
static function convertSQLFromMysql($line,$type='auto',$unescapeslashquot=false)
|
||||
{
|
||||
global $conf;
|
||||
// Removed empty line if this is a comment line for SVN tagging
|
||||
if (preg_match('/^--\s\$Id/i',$line)) {
|
||||
return '';
|
||||
@@ -311,7 +312,14 @@ class DoliDBPgsql extends DoliDB
|
||||
}
|
||||
|
||||
// To have postgresql case sensitive
|
||||
$line=str_replace(' LIKE \'',' ILIKE \'',$line);
|
||||
$count_like=0;
|
||||
$line=str_replace(' LIKE \'',' ILIKE \'',$line,$count_like);
|
||||
if (!empty($conf->global->PSQL_USE_UNACCENT) && $count_like > 0)
|
||||
{
|
||||
// @see https://docs.postgresql.fr/11/unaccent.html : 'unaccent()' function must be installed before
|
||||
$line=preg_replace('/\s+(\(+\s*)([a-zA-Z0-9\-\_\.]+) ILIKE /', ' \1unaccent(\2) ILIKE ', $line);
|
||||
}
|
||||
|
||||
$line=str_replace(' LIKE BINARY \'',' LIKE \'',$line);
|
||||
|
||||
// Replace INSERT IGNORE into INSERT
|
||||
|
||||
Reference in New Issue
Block a user