Aleksander Machniak
2016-04-21 f0fa9324d83ea1bd57f0b702e3b419f7194169cb
program/lib/Roundcube/rcube_addressbook.php
@@ -130,10 +130,10 @@
    /**
     * Get a specific contact record
     *
     * @param mixed record identifier(s)
     * @param mixed   Record identifier(s)
     * @param boolean True to return record as associative array, otherwise a result set is returned
     *
     * @return mixed Result object with all record fields or False if not found
     * @return rcube_result_set|array Result object with all record fields
     */
    abstract function get_record($id, $assoc=false);
@@ -539,7 +539,7 @@
        else if ($compose_mode == 1)
            $fn = join(' ', array($contact['firstname'], $contact['middlename'], $contact['surname']));
        else if ($compose_mode == 0)
            $fn = !empty($contact['name']) ? $contact['name'] : join(' ', array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix']));
            $fn = $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'];
@@ -550,12 +550,12 @@
        // fallbacks...
        if ($fn === '') {
            // ... display name
            if (!empty($contact['name'])) {
                $fn = $contact['name'];
            if ($name = trim($contact['name'])) {
                $fn = $name;
            }
            // ... organization
            else if (!empty($contact['organization'])) {
                $fn = $contact['organization'];
            else if ($org = trim($contact['organization'])) {
                $fn = $org;
            }
            // ... email address
            else if (($email = self::get_col_values('email', $contact, true)) && !empty($email)) {