From 5cf561223f6a68acfe0e09099cfdeccdc64b4cfe Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 14 Jan 2011 14:40:43 +0000 Subject: [PATCH] Updated uid_gen to start counting by 1 instead of 0 in idGeneration definitions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20590 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/functions.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index b68c9e550..fde2df70e 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -3779,10 +3779,11 @@ function gen_uids($rule, $attributes) if(!isset($match[5])){ $replacements[$match[0]][] = $attributes[$match[2]]; - // Start given but no end, so just add a simple character + // Start given but no end, so just add a single character }elseif(!isset($match[7])){ if(isset($attributes[$match[2]][$match[5]])){ - $replacements[$match[0]][] = $attributes[$match[2]][$match[5]]; + $tmp = " ".$attributes[$match[2]]; + $replacements[$match[0]][] = trim($tmp[$match[5]]); } // Add all values in range @@ -3790,8 +3791,9 @@ function gen_uids($rule, $attributes) $str = ""; for($i=$match[5]; $i<= $match[7]; $i++){ if(isset($attributes[$match[2]][$i])){ - $str .= $attributes[$match[2]][$i]; - $replacements[$match[0]][] = $str; + $tmp = " ".$attributes[$match[2]]; + $str .= $tmp[$i]; + $replacements[$match[0]][] = trim($str); } } } -- 2.30.2