Thomas Bruederli
2012-11-17 be9aacaa5296dfca63fb3a01c2dc52538d1546aa
program/include/rcube_addressbook.php
@@ -23,7 +23,8 @@
/**
 * Abstract skeleton of an address book/repository
 *
 * @package Addressbook
 * @package    Framework
 * @subpackage Addressbook
 */
abstract class rcube_addressbook
{
@@ -422,7 +423,7 @@
    function get_col_values($col, $data, $flat = false)
    {
        $out = array();
        foreach ($data as $c => $values) {
        foreach ((array)$data as $c => $values) {
            if ($c === $col || strpos($c, $col.':') === 0) {
                if ($flat) {
                    $out = array_merge($out, (array)$values);
@@ -432,6 +433,11 @@
                    $out[$type] = array_merge((array)$out[$type], (array)$values);
                }
            }
        }
        // remove duplicates
        if ($flat && !empty($out)) {
            $out = array_unique($out);
        }
        return $out;
@@ -448,7 +454,7 @@
     */
    protected static function normalize_string($str)
    {
        return rcbe_utils::normalize_string($str);
        return rcube_utils::normalize_string($str);
    }
    /**
@@ -465,7 +471,7 @@
        $fn = $contact['name'];
        if (!$fn)  // default display name composition according to vcard standard
            $fn = join(' ', array_filter(array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix'])));
            $fn = trim(join(' ', array_filter(array($contact['prefix'], $contact['firstname'], $contact['middlename'], $contact['surname'], $contact['suffix']))));
        // use email address part for name
        $email = is_array($contact['email']) ? $contact['email'][0] : $contact['email'];