Code

Added proposal for ldap:// definitions
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Aug 2008 14:00:01 +0000 (14:00 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 1 Aug 2008 14:00:01 +0000 (14:00 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12100 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/services/ldap/class_goLdapServer.inc

index f44c60fb7ea8cbbfaa0a4a78cbf289fea5cdc2b6..4c1380fe70198e79afd65248c62f4d674d58ad96 100644 (file)
@@ -27,6 +27,16 @@ class goLdapServer extends goService{
   {
     goService::goService($config,$dn);
     $this->DisplayName = _("LDAP service");
+
+    /* Suggest a default value */
+    if ($this->goLdapBase == ""){
+      if ($this->dn == ""){
+        $srv= _("fill-in-your-servers-dns-name");
+      } else {
+        $srv= preg_replace("/^cn=([^,]+),.*$/", "$1", $this->dn);
+      }
+      $this->goLdapBase= "ldap://$srv:389/".$config->current['BASE'];
+    }
   }