summaryrefslogtreecommitdiff
path: root/program/include/rcmail.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-08-26 10:28:34 +0200
committerAleksander Machniak <alec@alec.pl>2013-08-26 10:29:23 +0200
commit4fbbd81b9b2230df3b06b773b829f0e3991664f3 (patch)
tree39f026723e777c44a8462cb0adf807714c958986 /program/include/rcmail.php
parent652577d1fe8d77bf427c80a36f57c8dfe4db44af (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.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/program/include/rcmail.php b/program/include/rcmail.php
index 4cfaca13c..c9350bdd9 100644
--- a/program/include/rcmail.php
+++ b/program/include/rcmail.php
@@ -257,6 +257,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