Code

Updated workstation - Startup
[gosa.git] / plugins / admin / systems / class_winGeneric.inc
index 97de3be8bde7509911ed6c24fdd55fe3768d7098..ef279f3ab20351aa809392b7a04f8e4c51a9bdad 100644 (file)
@@ -46,10 +46,10 @@ class wingeneric extends plugin
 
   var $view_logged = FALSE;
 
-  function wingeneric ($config, $dn= NULL, $parent= NULL)
+  function wingeneric (&$config, $dn= NULL, $parent= NULL)
   {
     plugin::plugin ($config, $dn, $parent);
-    $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+    $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
     /* Set base */
     if ($this->dn == "new"){
       $ui= get_userinfo();
@@ -91,7 +91,7 @@ class wingeneric extends plugin
 
 
     /* Do we represent a valid phone? */
-    if (!$this->is_account && $this->parent == NULL){
+    if (!$this->is_account && $this->parent === NULL){
       $display= "<img alt=\"\" src=\"images/stop.png\" align=middle>&nbsp;<b>".
         _("This 'dn' has no network features.")."</b>";
       return($display);
@@ -142,7 +142,11 @@ class wingeneric extends plugin
     $smarty->assign("base_select", $this->base);
 
     /* Show main page */
-    $smarty->assign("netconfig", $this->netConfigDNS->execute());
+    $str = $this->netConfigDNS->execute();
+    if(is_object($this->netConfigDNS->dialog)){
+      return($str);
+    }
+    $smarty->assign("netconfig", $str);
     return($smarty->fetch (get_template_path('wingeneric.tpl', TRUE)));
   }
 
@@ -269,7 +273,7 @@ class wingeneric extends plugin
     }
 
     $this->netConfigDNS->cn =  preg_replace("/\\\$\$/","",$this->cn);
-    $this->netConfigDNS->save($this->dn);
+    $this->netConfigDNS->save();
     show_ldap_error($ldap->get_error(), sprintf(_("Saving of system wingeneric/generic with dn '%s' failed."),$this->dn));
 
     /* Optionally execute a command after we're done */