antonraharja/playSMS — pull request #319 by dvoryanchikov (2014-11-25 11:07:21+00:00)
Title: Small phonebook fixes.

* Fix error when changing visibility level on "edit group" page.
When trying to update visibility level we should check for other shared groups with same code,
but script was mistakenly checked for the same group exists and update fails, this patch fixes it.

* User should be able to move to groups only own contacts
Added dba_valid check for contact before moving it, this function has uid check for non-admin users,
so users can't anymore move others shared contacts from others shared groups to their own groups.
This is mostly a security permissions patch.

* Changed check for contact not in any group when moving to group using more suitable function.