summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f874c04)
raw | patch | inline | side by side (parent: f874c04)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Oct 2009 09:35:46 +0000 (09:35 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 8 Oct 2009 09:35:46 +0000 (09:35 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14563 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 28e5a7fc8ed3f03f87043554f0376f4e7b0e0a30..aa28014a03cd8ab43c6e8719b85949cbd380c4f4 100644 (file)
$size= preg_replace('/^.*{id(:|!)(\d+)}.*$/', '\\2', $uid);
$start= $m[1]==":"?0:-1;
- for ($i= $start, $p= pow(10,$size); $i < $p; $i++){
+ for ($i= $start, $p= pow(10,$size)-1; $i < $p; $i++){
if ($i == -1) {
$number= "";
} else {
break;
}
}
+
+ /* Remove link if nothing has been found */
+ $uid= preg_replace('/{id(:|!)\d+}/', '', $uid);
}
if(preg_match('/\{id#\d+}/',$uid)){
break;
}
}
+
+ /* Remove link if nothing has been found */
+ $uid= preg_replace('/{id#\d+}/', '', $uid);
}
/* Don't assign used ones */