| | |
| | | $this->ready = $this->db && !$this->db->is_error(); |
| | | } |
| | | |
| | | /** |
| | | * PHP 4 object constructor |
| | | * |
| | | * @see rcube_contacts::__construct() |
| | | */ |
| | | function rcube_contacts($dbconn, $user) |
| | | { |
| | | $this->__construct($dbconn, $user); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Set internal list page |
| | |
| | | if ($col == 'ID' || $col == $this->primary_key) |
| | | { |
| | | $ids = !is_array($value) ? split(',', $value) : $value; |
| | | $add_where[] = $this->primary_key." IN (".join(',', $ids).")"; |
| | | $add_where[] = $this->primary_key.' IN ('.join(',', $ids).')'; |
| | | } |
| | | else if ($strict) |
| | | $add_where[] = $this->db->quoteIdentifier($col)."=".$this->db->quote($value); |
| | | $add_where[] = $this->db->quoteIdentifier($col).'='.$this->db->quote($value); |
| | | else |
| | | $add_where[] = $this->db->quoteIdentifier($col)." LIKE ".$this->db->quote(strlen($value)>2 ? "%$value%" : "$value%"); |
| | | $add_where[] = $this->db->ilike($col, '%'.$value.'%'); |
| | | } |
| | | |
| | | if (!empty($add_where)) |