diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-20 22:57:32 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2008-02-20 22:57:32 +0000 |
| commit | 19537d238e61248b0f5d2a643b76597595c32e55 (patch) | |
| tree | 9218981255c8c2099a985ff4a8d19292e86610ae /roundcubemail/program/include | |
| parent | 60f2838ed6b3fb6e10406e64c0f7ed316ff3a477 (diff) | |
Add (currently unused) function to delete all contacts + update changelog
git-svn-id: https://svn.roundcube.net/trunk@1126 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
| -rw-r--r-- | roundcubemail/program/include/rcube_contacts.inc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/roundcubemail/program/include/rcube_contacts.inc b/roundcubemail/program/include/rcube_contacts.inc index f01d22279..6a4865662 100644 --- a/roundcubemail/program/include/rcube_contacts.inc +++ b/roundcubemail/program/include/rcube_contacts.inc @@ -386,6 +386,19 @@ class rcube_contacts return $this->db->affected_rows(); } + + + /** + * Remove all records from the database + */ + function delete_all() + { + if (is_array($ids)) + $ids = join(',', $ids); + + $this->db->query("DELETE FROM {$this->db_name} WHERE user_id=?", $this->user_id); + return $this->db->affected_rows(); + } } |
