diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index 0009690000dfa71b27037a04e1a6855778428a97..2a98149b2c37c476b98104ca4a20dc6d2f196861 100644 (file)
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"){
foreach($_POST as $name => $value){
if(preg_match("/^chooseBase/",$name) && $once){
$once = false;
- $this->dialog = new baseSelectDialog($this->config);
+ $this->dialog = new baseSelectDialog($this->config,$this);
$this->dialog->setCurrentBase($this->base);
}
}
$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")));
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
- show_ldap_error($ldap->get_error());
+ show_ldap_error($ldap->get_error(), sprintf(_("Removing of system phone/generic with dn '%s' failed."),$this->dn));
$this->handle_post_events("remove");
/* Delete references to object groups */
}
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->save($this->dn);
+ show_ldap_error($ldap->get_error(), sprintf(_("Saving of system phone/generic with dn '%s' failed."),$this->dn));
- show_ldap_error($ldap->get_error());
/* Optionally execute a command after we're done */
$this->postcreate();
}
+
+ /* Return plugin informations for acl handling
+ #FIXME FAIscript seams to ununsed within this class... */
+ function plInfo()
+ {
+ return (array(
+ "plShortName" => _("Generic"),
+ "plDescription" => _("Phone generic"),
+ "plSelfModify" => FALSE,
+ "plDepends" => array(),
+ "plPriority" => 0,
+ "plSection" => array("administration"),
+ "plCategory" => array("phone" => array("description" => _("Phone hardware"),
+ "objectClass" => "goFonHardware")),
+ "plProvidedAcls"=> array(
+ "cn" => _("Name"),
+ "description" => _("Description"),
+ "goFonType" => _("Mode"),
+ "goFonDmtfMode" => _("DTMF mode"),
+ "goFonDefaultIP" => _("Default ip"),
+ "goFonQualify" => _("Qualify"),
+ "selected_categorie" => _("Hardware type"))
+ ));
+ }
+
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: