diff options
author | alecpl <alec@alec.pl> | 2011-06-16 12:20:19 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2011-06-16 12:20:19 +0000 |
commit | cc90ed1f84174a89039feb6906775778e0c4eb18 (patch) | |
tree | 24984caa4b857dffb84a12ac3cde73bb967c466b /program/steps/addressbook/show.inc | |
parent | 1a034323fc7cefc8dd0283ae9d1a83ce3abbaf0a (diff) |
- Add addressbook name in contact info frame (#1487958)
Diffstat (limited to 'program/steps/addressbook/show.inc')
-rw-r--r-- | program/steps/addressbook/show.inc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index 998dee19a..36aff3141 100644 --- a/program/steps/addressbook/show.inc +++ b/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])) { |