blind-coder/rcmcarddav — pull request #19 by adobo (2014-02-14 08:16:42+00:00)
Title: Fix group membership removal

Removing a contact from a single group causes it to be removed from every group the contact was in, at least on the database. VCards work as expected.

**Steps to reproduce:**

1. Create 2 or more groups (example: *Group1*, *Group2*, *Group3*)
2. Create a new contact (*Contact1*).
3. Open *Contact1*, access the Groups tab and add it to *Group1*, *Group2* and *Group3*
4. Open any other contact/group and then open *Contact1* again. Make sure the Groups tab shows it is associated to the three groups
5. Remove *Contact1* it from *Group1* (uncheck)
6. Open any other contact/group and then open *Contact1* again
7. Now the contact isn't a member of neither *Group2* nor *Group3*

**Description of the solution provided by this PR:**

When removing a contact from a group, the CardDAV backend generates an SQL sentence that removes it from every group. The condition to remove it just from a given group is missing.

This PR adds an `$other_conditions` argument to the `delete_dbrecord()` method, which is used by `remove_from_group()` to specify which group the contact has to be removed from.