summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5368803)
raw | patch | inline | side by side (parent: 5368803)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 8 May 2006 09:51:23 +0000 (09:51 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 8 May 2006 09:51:23 +0000 (09:51 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3217 594d385d-05f5-0310-b6e9-bd551577e9d8
TODO | patch | blob | history | |
include/class_ldap.inc | patch | blob | history |
index c0eb1877ee2d2370f77d13b6cc88715c148b8a73..007a5b5adee5a2dffe3b721974fba752576eb7b3 100644 (file)
--- a/TODO
+++ b/TODO
* Auto-Resize for subdialogs
-* Fix create_missing_trees to gererate tags if needed, too
-
* Fix fai objects to generate tags if needed (sub objects, phone me...)
* Fix Phone book to generate tags if needed
diff --git a/include/class_ldap.inc b/include/class_ldap.inc
index cd615717e7ef06181d7d3767f1d715cebaecbe62..f8546bdf777bea71d35d447d2b44e66b2ec22d1a 100644 (file)
--- a/include/class_ldap.inc
+++ b/include/class_ldap.inc
$l= array_reverse(ldap_explode_dn($real_path,0));
unset($l['count']);
$cdn= $this->basedn;
+ $tag= "";
foreach ($l as $part){
$cdn= "$part,$cdn";
$attrs= $this->fetch();
/* Create missing entry? */
- if (!count ($attrs)){
+ if (count ($attrs)){
+
+ /* Catch the tag - if present */
+ if (isset($attrs['gosaUnitTag'][0])){
+ $tag= $attrs['gosaUnitTag'][0];
+ }
+
+ } else {
$type= preg_replace('/^([^=]+)=.*$/', '\\1', $cdn);
$param= preg_replace('/^[^=]+=([^,]+),.*$/', '\\1', $cdn);
$na= array();
switch ($type){
case 'ou':
- $na["objectClass"]= "organizationalUnit";
+ if ($tag != ""){
+ $na["objectClass"]= array("organizationalUnit", "gosaAdministrativeUnitTag");
+ $na["gosaUnitTag"]= $tag;
+ } else {
+ $na["objectClass"]= "organizationalUnit";
+ }
$na["ou"]= $param;
break;
case 'dc':
- $na["objectClass"]= array("dcObject", "top", "locality");
+ if ($tag != ""){
+ $na["objectClass"]= array("dcObject", "top", "locality", "gosaAdministrativeUnitTag");
+ $na["gosaUnitTag"]= $tag;
+ } else {
+ $na["objectClass"]= array("dcObject", "top", "locality");
+ }
$na["dc"]= $param;
break;
default: