Code

Updated get_ou it receives values from the config registry now.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 May 2010 13:33:21 +0000 (13:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 May 2010 13:33:21 +0000 (13:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18278 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/samba/admin/systems/samba/class_winGeneric.inc

index 1ba789d10e3eb8693e0483aeee75290ba8fe302c..ce697a00692d18a669906307ece6e3c9daae62dc 100644 (file)
@@ -60,8 +60,8 @@ class wingeneric extends plugin
       $ui = get_userinfo();
       $this->base= dn2base(session::global_is_set("CurrentMainBase")?"cn=dummy,".session::global_get("CurrentMainBase"):$ui->dn);
       $this->cn= "";
-    } elseif(preg_match("/".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", $this->dn)){
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("systemIncomingRDN"), '/')."/i", "", $this->dn);
+    } elseif(preg_match("/".preg_quote(get_ou("wingeneric", "sambaMachineAccountRDN") , '/')."/i", $this->dn)){
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("wingeneric", "sambaMachineAccountRDN") , '/')."/i", "", $this->dn);
     } else {
       $this->base= preg_replace ("/^[^,]+,".preg_quote(get_winstations_ou(), '/')."/i", "", $this->dn);
     }
@@ -192,7 +192,7 @@ class wingeneric extends plugin
     /* Call common method to give check the hook */
     $message= plugin::check();
     $message= array_merge($message, $this->netConfigDNS->check());
-    $this->dn= "cn=".$this->uid.",".get_ou('sambaMachineAccountRDN').$this->base;
+    $this->dn= "cn=".$this->uid.",".get_ou("wingeneric", "sambaMachineAccountRDN") .$this->base;
 
     if(!$this->acl_is_createable()){
       $message[]= msgPool::permCreate();