From 46c6ebd95c4da9a5552f6d1b3598b383c5360be5 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 27 Aug 2010 15:04:34 +0000 Subject: [PATCH] Fixed uid proposal for templates -It wasn't able handle accents git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19481 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 33ef64f6d..d87a157c1 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -2060,6 +2060,13 @@ function gen_uids($rule, $attributes) { global $config; + // Strip out non ascii chars + foreach($attributes as $name => $value){ + $value = iconv('UTF-8', 'US-ASCII//TRANSLIT', $value); + $value = preg_replace('/[^(\x20-\x7F)]*/','',$value); + $attributes[$name] = $value; + } + /* Search for keys and fill the variables array with all possible values for that key. */ $part= ""; -- 2.30.2