Code

text: tags are allowed now.
[gosa.git] / include / class_ldap.inc
index d50b78d55f058dfa0a7d747833f1865986aed398..c8397fd4a326badc91e8f109193b422de0a88c88 100644 (file)
@@ -549,6 +549,7 @@ class LDAP{
           unset($attr['dn']);
 
           if((!in_array("gosaApplication" , $attr['objectClass'])) && (!in_array("gotoMimeType", $attr['objectClass']))){
+            $attr['FAIdebianRelease'] = $destinationName;
             if($type=="branch"){
               $attr['FAIstate'] ="branch";
             }elseif($type=="freeze"){
@@ -1232,6 +1233,25 @@ class LDAP{
       }
     }
   }
+
+  function get_naming_contexts($server, $admin= "", $password= "")
+  {
+    /* Build LDAP connection */
+    $ds= ldap_connect ($server);
+    if (!$ds) {
+      die ("Can't bind to LDAP. No check possible!");
+    }
+    ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
+    $r= ldap_bind ($ds, $admin, $password);
+
+    /* Get base to look for naming contexts */
+    $sr  = @ldap_read ($ds, "", "objectClass=*", array("namingContexts"));
+    $attr= @ldap_get_entries($ds,$sr);
+    
+    return ($attr[0]['namingcontexts']);
+  }
+
+
 }
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: