diff options
author | Thomas B. <thomas@roundcube.net> | 2013-10-21 08:22:13 -0700 |
---|---|---|
committer | Thomas B. <thomas@roundcube.net> | 2013-10-21 08:22:13 -0700 |
commit | e1ae18311aed1c40a3085bffa3b35d0eef15242b (patch) | |
tree | e4ba96e2f2054683bd5e1ca215088dfcdb466c97 /program | |
parent | b461a2d72ea1fa2f7488710e5c5329848adf43fd (diff) | |
parent | 03713dbf5d45ee978b07586c4af1f924b204b5f1 (diff) |
Merge pull request #142 from Takika/patch-2
Add contact_listname hook to handle special name order
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/Roundcube/rcube_addressbook.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php index f57a30eb9..886f65cb9 100644 --- a/program/lib/Roundcube/rcube_addressbook.php +++ b/program/lib/Roundcube/rcube_addressbook.php @@ -532,8 +532,12 @@ abstract class rcube_addressbook $fn = join(' ', array($contact['surname'], $contact['firstname'], $contact['middlename'])); else if ($compose_mode == 1) $fn = join(' ', array($contact['firstname'], $contact['middlename'], $contact['surname'])); - else + else if ($compose_mode == 0) $fn = !empty($contact['name']) ? $contact['name'] : join(' ', array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix'])); + else { + $plugin = rcube::get_instance()->plugins->exec_hook('contact_listname', array('contact' => $contact)); + $fn = $plugin['fn']; + } $fn = trim($fn, ', '); |