From 6b8edbdeeefe17fb50f337f61b9af35beeac74a0 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 26 Jul 2011 17:21:26 +0000 Subject: Always show address book name if multiple books are configured; fix styling git-svn-id: https://svn.roundcube.net/trunk@4969 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/steps/addressbook/func.inc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'roundcubemail/program/steps/addressbook/func.inc') diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc index 6b3ebad08..0a5a02287 100644 --- a/roundcubemail/program/steps/addressbook/func.inc +++ b/roundcubemail/program/steps/addressbook/func.inc @@ -160,6 +160,20 @@ function rcmail_default_source($writable=false) return $list[key($list)]['id']; } +function rcmail_set_sourcename($abook) +{ + global $OUTPUT; + + // get address book name (for display) + if ($abook && $_SESSION['addressbooks_count'] > 1) { + $name = $abook->get_name(); + if (!$name && $source == 0) { + $name = rcube_label('personaladrbook'); + } + $OUTPUT->set_env('sourcename', $name); + } +} + function rcmail_directory_list($attrib) { -- cgit v1.2.3