diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-11-23 09:11:19 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-11-23 09:11:19 +0100 |
commit | 65dff8f812cc6b0c4fdd470905700143910289b2 (patch) | |
tree | 1f03d3b18287c56bd1554fa8304aa3da94b4d840 /program/steps/addressbook | |
parent | 922a1fb714f6842f41e1b224e2e99fb9673183da (diff) |
Fix hidden flag and default_addressbook settings handling
Diffstat (limited to 'program/steps/addressbook')
-rw-r--r-- | program/steps/addressbook/edit.inc | 4 | ||||
-rw-r--r-- | program/steps/addressbook/func.inc | 11 | ||||
-rw-r--r-- | program/steps/addressbook/import.inc | 2 |
3 files changed, 3 insertions, 14 deletions
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc index b216a7c70..d175c05d9 100644 --- a/program/steps/addressbook/edit.inc +++ b/program/steps/addressbook/edit.inc @@ -52,7 +52,7 @@ else { // find writable addressbook if (!$CONTACTS || $CONTACTS->readonly) - $source = rcmail_default_source(true); + $source = $RCMAIL->get_address_book(-1, true); // Initialize addressbook $CONTACTS = rcmail_contact_source($source, true); @@ -239,7 +239,7 @@ function rcmail_source_selector($attrib) { global $RCMAIL, $SOURCE_ID; - $sources_list = $RCMAIL->get_address_sources(true); + $sources_list = $RCMAIL->get_address_sources(true, true); if (count($sources_list) < 2) { $source = $sources_list[$SOURCE_ID]; diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index e42e26e1e..fded9a819 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -160,17 +160,6 @@ function rcmail_contact_source($source=null, $init_env=false, $writable=false) } -function rcmail_default_source($writable=false) -{ - global $RCMAIL; - - // get list of address sources - $first = reset($RCMAIL->get_address_sources($writable)); - - // use first directory by default - return $first['id']; -} - function rcmail_set_sourcename($abook) { global $OUTPUT; diff --git a/program/steps/addressbook/import.inc b/program/steps/addressbook/import.inc index 6d60f829c..df07d64bc 100644 --- a/program/steps/addressbook/import.inc +++ b/program/steps/addressbook/import.inc @@ -30,7 +30,7 @@ function rcmail_import_form($attrib) $attrib += array('id' => "rcmImportForm"); - $writable_books = $RCMAIL->get_address_sources(true); + $writable_books = $RCMAIL->get_address_sources(true, true); $upload = new html_inputfield(array( 'type' => 'file', |