summaryrefslogtreecommitdiff
path: root/program/include/rcube_contacts.inc
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-02-20 22:57:32 +0000
committerthomascube <thomas@roundcube.net>2008-02-20 22:57:32 +0000
commit103d6b697ce53eb8e954b4a4c9eac659ef942b24 (patch)
tree94e2141146dfe4326619d33b8c34f9d3ea540856 /program/include/rcube_contacts.inc
parentae8f192c90dfab0bfa052d7cb247e03e80a7a249 (diff)
Add (currently unused) function to delete all contacts + update changelog
Diffstat (limited to 'program/include/rcube_contacts.inc')
-rw-r--r--program/include/rcube_contacts.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/program/include/rcube_contacts.inc b/program/include/rcube_contacts.inc
index f01d22279..6a4865662 100644
--- a/program/include/rcube_contacts.inc
+++ b/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();
+ }
}