diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4a65754e975bd..b8ede132215e8 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7576,7 +7576,7 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield=' { $dictvalues[$tablename] = array(); $sql = 'SELECT * FROM '.$tablename.' WHERE 1'; - if ($checkentity) $sql.= ' entity IN (0,'.getEntity('').')'; + if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity('').')'; $resql = $db->query($sql); if ($resql) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index ce83e3a3460f3..18c5dd4962a98 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -130,8 +130,8 @@ $dolibarr_main_document_root=trim($dolibarr_main_document_root); $dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt)); -if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=0; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql' -if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql' +if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=3306; // For compatibility with old configs, if not defined, we take 'mysql' type +if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For compatibility with old configs, if not defined, we take 'mysql' type // Mysql driver support has been removed in favor of mysqli if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli';