mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-09 09:36:50 +01:00
Always show address book name if multiple books are configured; fix styling
This commit is contained in:
@@ -54,7 +54,7 @@ else {
|
||||
}
|
||||
|
||||
$SOURCE_ID = $source;
|
||||
|
||||
rcmail_set_sourcename($CONTACTS);
|
||||
|
||||
function rcmail_get_edit_record()
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -34,13 +34,7 @@ if ($cid && ($record = $CONTACTS->get_record($cid, true))) {
|
||||
}
|
||||
|
||||
// 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);
|
||||
}
|
||||
rcmail_set_sourcename($CONTACTS);
|
||||
|
||||
// return raw photo of the given contact
|
||||
if ($RCMAIL->action == 'photo') {
|
||||
|
||||
Reference in New Issue
Block a user