Code

Updated preg_matches
[gosa.git] / plugins / admin / systems / class_phoneGeneric.inc
index 0009690000dfa71b27037a04e1a6855778428a97..76718175b7e3a42f7933ce8ac1d0bf54b27b05e3 100644 (file)
@@ -53,10 +53,10 @@ class phoneGeneric extends plugin
 
   var $objectclasses= array("top", "goFonHardware");
 
-  function phonegeneric ($config, $dn= NULL)
+  function phonegeneric ($config, $dn= NULL, $parent= NULL)
   {
-    plugin::plugin ($config, $dn);
-    $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+    plugin::plugin ($config, $dn, $parent);
+    $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses, true);
 
     /* Set base */
     if ($this->dn == "new"){
@@ -220,6 +220,7 @@ class phoneGeneric extends plugin
       $smarty->assign($attr."ACL", chkacl($this->acl, $attr));
     }
     $smarty->assign("base_select", $this->base);
+    $smarty->assign("baseACL", chkacl($this->acl,"base"));
    
     $smarty->assign("goFonDefaultIPs",array("dynamic"=>_("dynamic"),"network"=>_("Networksettings")));
  
@@ -243,7 +244,7 @@ class phoneGeneric extends plugin
 
     $this->netConfigDNS->remove_from_parent();
     $ldap->rmdir($this->dn);
-    show_ldap_error($ldap->get_error());
+    show_ldap_error($ldap->get_error(), _("Removing phone failed"));
     $this->handle_post_events("remove");
 
     /* Delete references to object groups */
@@ -393,8 +394,8 @@ class phoneGeneric extends plugin
     }
     $this->netConfigDNS->cn = $this->cn;    
     $this->netConfigDNS->save($this->dn);
+    show_ldap_error($ldap->get_error(), _("Saving phone failed"));
 
-    show_ldap_error($ldap->get_error());
     /* Optionally execute a command after we're done */
     $this->postcreate();
   }