Code

Updated workstation - Startup
[gosa.git] / plugins / admin / systems / tabs_winstation.inc
index 94817ad0ef00f9145cb11ca90f37de8a73114376..cada48b8034fbce207836de5f0af9901cebfbce7 100644 (file)
@@ -3,9 +3,9 @@
 class wintabs extends tabs
 {
 
-  function wintabs($config, $data, $dn)
+  function wintabs($config, $data, $dn,$category)
   {
-    tabs::tabs($config, $data, $dn);
+    tabs::tabs($config, $data, $dn,$category);
 
     /* Add references/acls/snapshots */
     $this->addSpecialTabs();
@@ -17,12 +17,18 @@ class wintabs extends tabs
   }
 
 
-  function save()
+  function save($ignore_account= FALSE)
   {
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
+
+    /* add $ to end of name if mising */
     $baseobject= $this->by_object['wingeneric'];
-    $this->dn= "cn=$baseobject->cn,ou=winstations,ou=systems,".$baseobject->base;
+    if(!preg_match("/\\\$\$/",$baseobject->cn)){
+      $baseobject->cn .= "$";
+    }
+
+    $this->dn= "uid=$baseobject->cn,".get_winstations_ou().$baseobject->base;
     $baseobject->dn= $this->dn;
 
     foreach ($this->by_object as $key => $obj){