From 2cdaa79dce689b2dc9ef5c7bf3dcbd9446d86c21 Mon Sep 17 00:00:00 2001
From: Paweł Słowik <pawel.slowik@iq.pl>
Date: Thu, 13 Sep 2012 08:24:01 -0400
Subject: [PATCH] Merge branch 'master' of https://github.com/roundcube/roundcubemail
---
program/include/rcube_addressbook.php | 26 +++-----------------------
1 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/program/include/rcube_addressbook.php b/program/include/rcube_addressbook.php
index 2f264f9..069ea57 100644
--- a/program/include/rcube_addressbook.php
+++ b/program/include/rcube_addressbook.php
@@ -17,9 +17,6 @@
+-----------------------------------------------------------------------+
| Author: Thomas Bruederli <roundcube@gmail.com> |
+-----------------------------------------------------------------------+
-
- $Id$
-
*/
@@ -425,7 +422,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);
@@ -447,29 +444,12 @@
*
* @param string Input string (UTF-8)
* @return string Normalized string
+ * @deprecated since 0.9-beta
*/
protected static function normalize_string($str)
{
- // split by words
- $arr = explode(" ", preg_replace(
- array('/[\s;\+\-\/]+/i', '/(\d)[-.\s]+(\d)/', '/\s\w{1,3}\s/'),
- array(' ', '\\1\\2', ' '),
- $str));
-
- foreach ($arr as $i => $part) {
- if (utf8_encode(utf8_decode($part)) == $part) { // is latin-1 ?
- $arr[$i] = utf8_encode(strtr(strtolower(strtr(utf8_decode($part),
- '��������������������������������������������������',
- 'ccaaaaeeeeiiiaeooouuuyooaiounnaaaaaeeeiiioooouuuyy')),
- array('�' => 'ss', 'ae' => 'a', 'oe' => 'o', 'ue' => 'u')));
- }
- else
- $arr[$i] = mb_strtolower($part);
- }
-
- return join(" ", $arr);
+ return rcube_utils::normalize_string($str);
}
-
/**
* Compose a valid display name from the given structured contact data
--
Gitblit v1.9.1