summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ca54158)
raw | patch | inline | side by side (parent: ca54158)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Sep 2007 06:17:49 +0000 (06:17 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Sep 2007 06:17:49 +0000 (06:17 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7364 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_componentGeneric.inc b/plugins/admin/systems/class_componentGeneric.inc
index 32530a5b594045215ac65a07474a5c0063e0f151..5605253aa5b91b0dbcf2072c7aba3632332a303d 100644 (file)
} else {
$this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
}
- $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses, true);
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
/* Save dn for later references */
$this->orig_dn= $this->dn;
}
}
$this->netConfigDNS->cn = $this->cn;
- $this->netConfigDNS->save($this->dn);
+ $this->netConfigDNS->save();
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system component/generic with dn '%s' failed."),$this->dn));
}
diff --git a/plugins/admin/systems/class_phoneGeneric.inc b/plugins/admin/systems/class_phoneGeneric.inc
index bb4efc3578bdd0b79e0d2673f7c7c26baa1bd951..1d8ff6c4568c746a0e729602038b67fe253016ae 100644 (file)
function phonegeneric (&$config, $dn= NULL, $parent= NULL)
{
plugin::plugin ($config, $dn, $parent);
- $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses, true);
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses, true);
/* Set base */
if ($this->dn == "new"){
$this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
}
$this->netConfigDNS->cn = $this->cn;
- $this->netConfigDNS->save($this->dn);
+ $this->netConfigDNS->save();
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system phone/generic with dn '%s' failed."),$this->dn));
}
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index ccadc0dd43bf57adf8ef3bdd2e5658929f9b1ed7..5b77578fed86ed386f1063659732fcb9fbe1a0f3 100644 (file)
}
/* create dns object */
- $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"){
if(preg_match("/printer/i",$this->BelongsTo)){
$this->netConfigDNS->cn = $this->cn;
$this->netConfigDNS->dn = $this->dn;
- $this->netConfigDNS->save($this->dn);
+ $this->netConfigDNS->save();
}
/* This is a multi object. Handle tagging here... */
diff --git a/plugins/admin/systems/class_servGeneric.inc b/plugins/admin/systems/class_servGeneric.inc
index 1acaaad4cb50a9a12ad2407207ccd6b6faf6a04a..d74fb92cd08a1625a2fb7385a68359937d2b5945 100644 (file)
} else {
$this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn);
}
- $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
$this->netConfigDNS->set_acl_category("server");
$this->netConfigDNS->set_acl_base($this->base);
}
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system server/generic with dn '%s' failed."),$this->dn));
$this->netConfigDNS->cn = $this->cn;
- $this->netConfigDNS->save($this->dn);
+ $this->netConfigDNS->save();
/* Optionally execute a command after we're done */
if(!$this->didAction){
index 9b91a0b89292f6ede0a030702d33bdee3877b439..79c26bfdb39eef0202f9e208d7523a61871471bf 100644 (file)
/* Terminal dns
*/
- function termDNS (&$config, $dn,$objectClasses,$IPisMust = false)
+ function termDNS (&$config, $parent,$objectClasses,$IPisMust = false)
{
/* We need to know which objectClasses are used, to store the ip/mac
* Because of different type of devices
- */
+ */
+ $this->parent = $parent;
$this->objectclasses = $objectClasses;
$this->IPisMust = $IPisMust;
- plugin::plugin ($config, $dn);
+ plugin::plugin ($config, $parent->dn);
if(isset($this->attrs['cn'][0])){
$this->OrigCn = preg_replace("/\\\$\$/","",$this->attrs['cn'][0]);
/* Save to LDAP */
- function save($dn)
+ function save()
{
$ldap= $this->config->get_ldap_link();
-
+
+ $dn = $this->parent->dn;
+
/*******************/
/* IP-MAC HANDLING */
/*******************/
diff --git a/plugins/admin/systems/class_terminalGeneric.inc b/plugins/admin/systems/class_terminalGeneric.inc
index 57a70ff55455afe9ae42416ea2e6d10928af1148..6b7d04b4fb9797191eb49971c061fbc62ba7bc7b 100644 (file)
$this->member_of_ogroup = $ldap->count() >= 1;
}
- $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
/* Read arrays */
foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
if (!isset($this->attrs[$val])){
}
$this->netConfigDNS->cn = $this->cn;
- $this->netConfigDNS->save($this->dn);
+ $this->netConfigDNS->save();
show_ldap_error($ldap->get_error(), sprintf(_("Saving of object system terminal/generic with dn '%s' failed."),$this->dn));
}
diff --git a/plugins/admin/systems/class_winGeneric.inc b/plugins/admin/systems/class_winGeneric.inc
index b1778a1a8cddbd792dfd1330d509d818dadf2e4a..173d6552089ad8516af42172b9837924f44066da 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,$this->objectclasses);
/* Set base */
if ($this->dn == "new"){
$ui= get_userinfo();
}
$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 */
diff --git a/plugins/admin/systems/class_workstationGeneric.inc b/plugins/admin/systems/class_workstationGeneric.inc
index 59427c35a9801c0bec207a38d351b99c2d8babb1..734a8459842e8ccf797df2f0fc2c9aca0a08cf56 100644 (file)
$this->member_of_ogroup = $ldap->count() >= 1;
}
- $this->netConfigDNS = new termDNS($this->config,$this->dn,$this->objectclasses);
+ $this->netConfigDNS = new termDNS($this->config,$this,$this->objectclasses);
/* Read arrays */
foreach (array("ghNetNic", "ghIdeDev", "ghScsiDev") as $val){
}
$this->netConfigDNS->cn = $this->cn;
- $this->netConfigDNS->save($this->dn);
+ $this->netConfigDNS->save();
show_ldap_error($ldap->get_error(), sprintf(_("Saving of system workstation/generic with dn '%s' failed."),$this->dn));
}