Clean code
This commit is contained in:
parent
8473cd253c
commit
44a5c320fc
1 changed files with 4 additions and 4 deletions
|
|
@ -489,15 +489,15 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
|
||||
$sqlwhere[] = $key.'='.((int) $value);
|
||||
$sqlwhere[] = $this->db->sanitize($key).' = '.((int) $value);
|
||||
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
|
||||
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
||||
$sqlwhere[] = $this->db->sanitize($key)." = '".$this->db->idate($value)."'";
|
||||
} elseif ($key == 'customsql') {
|
||||
$sqlwhere[] = $value;
|
||||
} elseif (strpos($value, '%') === false) {
|
||||
$sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')';
|
||||
$sqlwhere[] = $this->db->sanitize($key).' IN ('.$this->db->sanitize($this->db->escape($value)).')';
|
||||
} else {
|
||||
$sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
|
||||
$sqlwhere[] = $this->db->sanitize($key)." LIKE '%".$this->db->escape($value)."%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue