Skip to content

Commit

Permalink
Merge pull request #9095 from IAS-SYSTEMS-CSC/dolibarr-fixes
Browse files Browse the repository at this point in the history
fix sql error functions.lib.php
  • Loading branch information
eldy committed Jul 15, 2018
2 parents b796c10 + 0ca9f6f commit ba36d1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion htdocs/core/lib/functions.lib.php
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions htdocs/filefunc.inc.php
Expand Up @@ -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';
Expand Down

0 comments on commit ba36d1a

Please sign in to comment.