FIX: pgsql: prevent 'WHERE 1'
This commit is contained in:
parent
e6b4f1eab6
commit
139ae3db00
@ -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'] = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8123,7 +8123,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);
|
||||||
|
|||||||
@ -3320,7 +3320,7 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sql .= " WHERE 1";
|
$sql .= " WHERE 1 = 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manage filter
|
// Manage filter
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user