diff options
author | alecpl <alec@alec.pl> | 2011-07-27 13:42:15 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-07-27 13:42:15 +0000 |
commit | 70c31118264e447699d4ed628f45b7853799423d (patch) | |
tree | 1405a48f5ea135c8370839057a0ba54255289936 /program/steps/addressbook/func.inc | |
parent | 5ed119e5341a9c1225bbb40c6e3d6ea787ca17ed (diff) |
- Fix fallback to default source (#1488009)
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r-- | program/steps/addressbook/func.inc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index b74b45f79..6635d1338 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -100,7 +100,7 @@ if ($undo = $_SESSION['contact_undo']) { } // instantiate a contacts object according to the given source -function rcmail_contact_source($source=null, $init_env=false) +function rcmail_contact_source($source=null, $init_env=false, $writable=false) { global $RCMAIL, $OUTPUT, $CONFIG, $CONTACT_COLTYPES; @@ -108,12 +108,8 @@ function rcmail_contact_source($source=null, $init_env=false) $source = get_input_value('_source', RCUBE_INPUT_GPC); } - if (!strlen($source)) { - return null; - } - // Get object - $CONTACTS = $RCMAIL->get_address_book($source); + $CONTACTS = $RCMAIL->get_address_book($source, $writable); $CONTACTS->set_pagesize($CONFIG['pagesize']); // set list properties and session vars @@ -163,7 +159,7 @@ function rcmail_default_source($writable=false) function rcmail_set_sourcename($abook) { global $OUTPUT; - + // get address book name (for display) if ($abook && $_SESSION['addressbooks_count'] > 1) { $name = $abook->get_name(); |