summaryrefslogtreecommitdiff
path: root/roundcubemail/program/steps
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-06-16 12:20:19 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-06-16 12:20:19 +0000
commit55ccec14bf82d88067eb8a13c62b6ba1f0de7d7b (patch)
treeb7cd1244b1f29e65b8d437dc4cedd0456dca87f3 /roundcubemail/program/steps
parent59029fc29d6c8d9ed99786859ddf7fb9ae5fd172 (diff)
- Add addressbook name in contact info frame (#1487958)
git-svn-id: https://svn.roundcube.net/trunk@4857 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc1
-rw-r--r--roundcubemail/program/steps/addressbook/show.inc9
2 files changed, 10 insertions, 0 deletions
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index 08f2a3230..1bb373f75 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/program/steps/addressbook/func.inc
@@ -81,6 +81,7 @@ if (!$RCMAIL->action && !$OUTPUT->ajax_call) {
$OUTPUT->set_env('address_sources', $js_list);
$OUTPUT->set_pagetitle(rcube_label('addressbook'));
+ $_SESSION['addressbooks_count'] = count($js_list);
$CONTACTS = rcmail_contact_source($source, true);
}
diff --git a/roundcubemail/program/steps/addressbook/show.inc b/roundcubemail/program/steps/addressbook/show.inc
index 998dee19a..36aff3141 100644
--- a/roundcubemail/program/steps/addressbook/show.inc
+++ b/roundcubemail/program/steps/addressbook/show.inc
@@ -32,6 +32,15 @@ if ($cid && ($record = $CONTACTS->get_record($cid, true))) {
$OUTPUT->set_env('cid', $record['ID']);
}
+// get address book name (for display)
+if ($_SESSION['addressbooks_count'] > 1) {
+ $name = $CONTACTS->get_name();
+ if (!$name && $source == 0) {
+ $name = rcube_label('personaladrbook');
+ }
+ $OUTPUT->set_env('sourcename', $name);
+}
+
// return raw photo of the given contact
if ($RCMAIL->action == 'photo') {
if (($file_id = get_input_value('_photo', RCUBE_INPUT_GPC)) && ($tempfile = $_SESSION['contacts']['files'][$file_id])) {