summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7dcf639)
raw | patch | inline | side by side (parent: 7dcf639)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Jun 2009 12:21:13 +0000 (12:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 23 Jun 2009 12:21:13 +0000 (12:21 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@13774 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_termDNS.inc | patch | blob | history | |
plugins/admin/systems/class_winGeneric.inc | patch | blob | history |
index 5f861551e5746e1ee1f15423031d73b942505964..ef0ced1b8b660fbdb04981c3147a7183db2a0986 100644 (file)
var $dnsEntry = array();
var $DNSenabled = false;
var $hide_dns_check_box = FALSE;
-
+ var $namingAttr = "cn";
+
/* Terminal dns
*/
- function termDNS ($config, $dn,$objectClasses,$IPisMust = false)
+ function termDNS ($config, $dn,$objectClasses,$IPisMust = false, $namingAttr = "cn")
{
/* We need to know which objectClasses are used, to store the ip/mac
* Because of different type of devices
*/
$this->objectclasses = $objectClasses;
$this->IPisMust = $IPisMust;
+ $this->namingAttr = $namingAttr;
plugin::plugin ($config, $dn);
- if(isset($this->attrs['cn'][0])){
- $this->OrigCn = preg_replace("/\\\$\$/","",$this->attrs['cn'][0]);
- $this->cn = preg_replace("/\\\$\$/","",$this->attrs['cn'][0]);
+ if(isset($this->attrs[$this->namingAttr][0])){
+ $this->OrigCn = preg_replace("/\\\$\$/","",$this->attrs[$this->namingAttr][0]);
+ $this->cn = preg_replace("/\\\$\$/","",$this->attrs[$this->namingAttr][0]);
}
diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc
index 9867125230c21e5d9e244731cab17449bf1352fa..0f927711abfd44975ed514f1608ad78a978293c0 100644 (file)
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->dn,$this->objectclasses,FALSE,'uid');
$this->netConfigDNS->acl = $this->acl;
$this->netConfigDNS->MACisMust = FALSE;
}
$smarty->assign("base_select", $this->base);
- $this->netConfigDNS->cn= $this->cn;
+ $this->netConfigDNS->cn= $this->uid;
$smarty->assign("netconfig", $this->netConfigDNS->execute());
/* Display sub dialog from network settings */
$this->handle_post_events("modify");
}
- $this->netConfigDNS->cn = preg_replace("/\\\$\$/","",$this->cn);
+ $this->netConfigDNS->cn = preg_replace("/\\\$\$/","",$this->uid);
$this->netConfigDNS->save($this->dn);
show_ldap_error($ldap->get_error(), _("Saving Samba workstation failed"));