Changeset 7f5a849 in github for program/include/rcube_contacts.php
- Timestamp:
- Jul 7, 2011 7:44:26 AM (23 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 65b61cd
- Parents:
- 632528f
- File:
-
- 1 edited
-
program/include/rcube_contacts.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_contacts.php
rcc90ed1 r7f5a849 53 53 public $readonly = false; 54 54 public $groups = true; 55 public $undelete = true; 55 56 public $list_page = 1; 56 57 public $page_size = 10; … … 693 694 694 695 /** 696 * Undelete one or more contact records 697 * 698 * @param array Record identifiers 699 */ 700 function undelete($ids) 701 { 702 if (!is_array($ids)) 703 $ids = explode(',', $ids); 704 705 $ids = $this->db->array2list($ids, 'integer'); 706 707 // flag record as deleted 708 $this->db->query( 709 "UPDATE ".get_table_name($this->db_name). 710 " SET del=0, changed=".$this->db->now(). 711 " WHERE user_id=?". 712 " AND contact_id IN ($ids)", 713 $this->user_id 714 ); 715 716 $this->cache = null; 717 718 return $this->db->affected_rows(); 719 } 720 721 722 /** 695 723 * Remove all records from the database 696 724 */ 697 725 function delete_all() 698 726 { 699 $this->db->query("DELETE FROM ".get_table_name($this->db_name)." WHERE user_id = ?", $this->user_id);700 727 $this->cache = null; 728 729 $this->db->query("UPDATE ".get_table_name($this->db_name). 730 " SET del=1, changed=".$this->db->now(). 731 " WHERE user_id = ?", $this->user_id); 732 701 733 return $this->db->affected_rows(); 702 734 }
Note: See TracChangeset
for help on using the changeset viewer.
