From be9aacaa5296dfca63fb3a01c2dc52538d1546aa Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Sat, 17 Nov 2012 12:31:31 -0500
Subject: [PATCH] Bring back lost localization for the about page
---
program/include/rcube_addressbook.php | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php
index fb2027b..b5fb8cf 100644
--- a/program/include/rcube_addressbook.php
+++ b/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'];
--
Gitblit v1.9.1