Code

Set workstation mac for printer too
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Sep 2006 11:15:24 +0000 (11:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 14 Sep 2006 11:15:24 +0000 (11:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4660 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 70530282075707dded4487383d3e2f9853725207..f032f5afcbce601f06dd4a0ddf32e9c828d8ba91 100644 (file)
@@ -661,6 +661,8 @@ class printgeneric extends plugin
 
     if($this->BelongsTo == "Workstation"){
       $this->dn= preg_replace("/ou=workstations,/","ou=printers,",$this->dn);
+      $mac = $this->parent->by_object['workgeneric']->netConfigDNS->macAddress;
+      $this->netConfigDNS->macAddress = $mac;
     }
     
     if(!$this->is_account) return;
@@ -772,6 +774,7 @@ class printgeneric extends plugin
     }
     show_ldap_error($ldap->get_error(), _("Saving printer failed"));
 
+
     $this->netConfigDNS->cn = $this->cn;
     $this->netConfigDNS->dn = $this->dn;
     $this->netConfigDNS->save($this->dn);