Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 13.0
Conflicts: htdocs/admin/mails_templates.php htdocs/societe/consumption.php htdocs/user/class/user.class.php
This commit is contained in:
commit
8410f4a9c9
@ -542,7 +542,7 @@ $cfg['ThemePerServer'] = FALSE; // allow diferent theme for each co
|
|||||||
* %f will be replaced by a list of field names.
|
* %f will be replaced by a list of field names.
|
||||||
* (%t and %f only applies to DefaultQueryTable)
|
* (%t and %f only applies to DefaultQueryTable)
|
||||||
*/
|
*/
|
||||||
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1';
|
$cfg['DefaultQueryTable'] = 'SELECT * FROM %t WHERE 1 = 1';
|
||||||
$cfg['DefaultQueryDatabase'] = '';
|
$cfg['DefaultQueryDatabase'] = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -289,14 +289,13 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si verif ok et action add, on ajoute la ligne
|
// If previous test is ok action is add, we add the line
|
||||||
if ($ok && GETPOST('actionadd'))
|
if ($ok && GETPOST('actionadd')) {
|
||||||
{
|
|
||||||
// Add new entry
|
// Add new entry
|
||||||
$sql = "INSERT INTO ".$tabname[$id]." (";
|
$sql = "INSERT INTO ".$tabname[$id]." (";
|
||||||
// List of fields
|
// List of fields
|
||||||
$sql .= $tabfieldinsert[$id];
|
$sql .= $tabfieldinsert[$id];
|
||||||
$sql .= ",active)";
|
$sql .= ", active, enabled)";
|
||||||
$sql .= " VALUES(";
|
$sql .= " VALUES(";
|
||||||
|
|
||||||
// List of values
|
// List of values
|
||||||
@ -332,7 +331,7 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$sql .= ", 1)";
|
$sql .= ", 1, 1)";
|
||||||
|
|
||||||
dol_syslog("actionadd", LOG_DEBUG);
|
dol_syslog("actionadd", LOG_DEBUG);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|||||||
@ -8457,7 +8457,7 @@ function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield
|
|||||||
if (!isset($dictvalues[$tablename]))
|
if (!isset($dictvalues[$tablename]))
|
||||||
{
|
{
|
||||||
$dictvalues[$tablename] = array();
|
$dictvalues[$tablename] = array();
|
||||||
$sql = 'SELECT * FROM '.$tablename.' WHERE 1'; // Here select * is allowed as it is generic code and we don't have list of fields
|
$sql = 'SELECT * FROM '.$tablename.' WHERE 1 = 1'; // Here select * is allowed as it is generic code and we don't have list of fields
|
||||||
if ($checkentity) $sql .= ' AND entity IN (0,'.getEntity($tablename).')';
|
if ($checkentity) $sql .= ' AND entity IN (0,'.getEntity($tablename).')';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -318,7 +318,7 @@ if (!empty($sql_select))
|
|||||||
if ($sref) $sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'";
|
if ($sref) $sql .= " AND ".$doc_number." LIKE '%".$db->escape($sref)."%'";
|
||||||
if ($sprod_fulldescr)
|
if ($sprod_fulldescr)
|
||||||
{
|
{
|
||||||
$sql .= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
$sql .= " AND (d.description LIKE '%".$db->escape($sprod_fulldescr)."%' OR d.description LIKE '%".$db->escape(dol_htmlentities($sprod_fulldescr))."%'";
|
||||||
if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.ref LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
||||||
if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
if (GETPOST('type_element') != 'fichinter') $sql .= " OR p.label LIKE '%".$db->escape($sprod_fulldescr)."%'";
|
||||||
$sql .= ")";
|
$sql .= ")";
|
||||||
|
|||||||
@ -3425,7 +3425,7 @@ class User extends CommonObject
|
|||||||
$sql .= " WHERE t.entity IN (".getEntity('user').")";
|
$sql .= " WHERE t.entity IN (".getEntity('user').")";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$sql .= " WHERE 1";
|
$sql .= " WHERE 1 = 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manage filter
|
// Manage filter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user