summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-11-25 11:25:14 +0100
committerAleksander Machniak <alec@alec.pl>2012-11-25 11:25:14 +0100
commit5352b55779aadc8b4c665daf69c7a27767f17d78 (patch)
tree07b1dbe580b644d2578071956349bffac63b6b4c /program/steps
parent297c1afb80bc73e595a6dad42adcd536cf947ea8 (diff)
parent65dff8f812cc6b0c4fdd470905700143910289b2 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Conflicts: CHANGELOG
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/addressbook/edit.inc4
-rw-r--r--program/steps/addressbook/func.inc11
-rw-r--r--program/steps/addressbook/import.inc2
-rw-r--r--program/steps/mail/compose.inc2
-rw-r--r--program/steps/settings/func.inc2
5 files changed, 5 insertions, 16 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',
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index ffc1c7518..92ec88f1b 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -1615,7 +1615,7 @@ function rcmail_addressbook_list($attrib = array())
'rel' => '%s',
'onclick' => "return ".JS_OBJECT_NAME.".command('list-adresses','%s',this)"), '%s'));
- foreach ($RCMAIL->get_address_sources() as $j => $source) {
+ foreach ($RCMAIL->get_address_sources(false, true) as $j => $source) {
$id = strval(strlen($source['id']) ? $source['id'] : $j);
$js_id = JQ($id);
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 2c19d88df..3bcca21bf 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -695,7 +695,7 @@ function rcmail_user_prefs($current=null)
);
if (!isset($no_override['default_addressbook'])
- && ($books = $RCMAIL->get_address_sources(true))
+ && ($books = $RCMAIL->get_address_sources(true, true))
) {
$field_id = 'rcmfd_default_addressbook';
$select_abook = new html_select(array('name' => '_default_addressbook', 'id' => $field_id));