diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-08-26 10:28:34 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-08-26 10:28:34 +0200 |
commit | 62350ba021d479e459cbbf7957841fbb440b9846 (patch) | |
tree | ed6209667488660bcf342983c4283cc7b5d249a0 /program/include/rcmail.php | |
parent | cccf8a5b088654148bc080f3dcead92312019686 (diff) |
Fix bugs when invoking contact creation form when read-only addressbook is selected (#1489296)
Diffstat (limited to 'program/include/rcmail.php')
-rw-r--r-- | program/include/rcmail.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php index 800eddac6..62f6b6c46 100644 --- a/program/include/rcmail.php +++ b/program/include/rcmail.php @@ -263,6 +263,23 @@ class rcmail extends rcube /** + * Return identifier of the address book object + * + * @param rcube_addressbook Addressbook source object + * + * @return string Source identifier + */ + public function get_address_book_id($object) + { + foreach ($this->address_books as $index => $book) { + if ($book === $object) { + return $index; + } + } + } + + + /** * Return address books list * * @param boolean True if the address book needs to be writeable |