| | |
| | | */ |
| | | class rcube_contacts extends rcube_addressbook |
| | | { |
| | | // protected for backward compat. with some plugins |
| | | // maybe changed in the future |
| | | protected $db_name = ''; |
| | | private $db = null; |
| | | private $db_name = ''; |
| | | private $user_id = 0; |
| | | private $filter = null; |
| | | private $result = null; |
| | |
| | | foreach ($fields as $col) { |
| | | if ($col == 'ID' || $col == $this->primary_key) { |
| | | $ids = !is_array($value) ? explode(',', $value) : $value; |
| | | $ids = join(',', array_map(array($this->db, 'quote'), $ids)); |
| | | $ids = $this->db->array2list($ids, 'integer'); |
| | | $add_where[] = 'c.' . $this->primary_key.' IN ('.$ids.')'; |
| | | } |
| | | else if ($strict) |
| | |
| | | if (!is_array($ids)) |
| | | $ids = explode(',', $ids); |
| | | |
| | | $ids = join(',', array_map(array($this->db, 'quote'), $ids)); |
| | | $ids = $this->db->array2list($ids, 'integer'); |
| | | |
| | | // flag record as deleted |
| | | $this->db->query( |
| | |
| | | if (!is_array($ids)) |
| | | $ids = explode(',', $ids); |
| | | |
| | | $ids = join(',', array_map(array($this->db, 'quote'), $ids)); |
| | | |
| | | $ids = $this->db->array2list($ids, 'integer'); |
| | | |
| | | $sql_result = $this->db->query( |
| | | "DELETE FROM ".get_table_name('contactgroupmembers'). |
| | | " WHERE contactgroup_id=?". |