Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
commit
0d98df9568
@ -2742,7 +2742,7 @@ abstract class CommonObject
|
||||
|
||||
$sql = 'UPDATE '.$this->db->prefix().$this->table_element;
|
||||
$sql .= " SET ".$fieldname." = ".(($id > 0 || $id == '0') ? ((int) $id) : 'NULL');
|
||||
if (in_array($this->table_element, array('propal', 'commande'))) {
|
||||
if (in_array($this->table_element, array('propal', 'commande', 'societe'))) {
|
||||
$sql .= " , deposit_percent = " . (empty($deposit_percent) ? 'NULL' : "'".$this->db->escape($deposit_percent)."'");
|
||||
}
|
||||
$sql .= ' WHERE rowid='.((int) $this->id);
|
||||
|
||||
@ -11550,7 +11550,7 @@ function forgeSQLFromUniversalSearchCriteria($filter, &$error = '')
|
||||
$t = str_replace(array('and','or','AND','OR',' '), '', $t); // Remove the only strings allowed between each () criteria
|
||||
// If the string result contains something else than '()', the syntax was wrong
|
||||
if (preg_match('/[^\(\)]/', $t)) {
|
||||
$error = 'Bad syntax of the search string, filter criteria is inhalited';
|
||||
$error = 'Bad syntax of the search string, filter criteria is invalidated';
|
||||
return '1 = 3'; // Bad syntax of the search string, we force a SQL not found
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user