diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 3a5a975c6d5a3ad299641368076849c83b1ab3c8..9d3c2cfe25ef6e524d4ccaacec09d0d064271f5e 100644 (file)
*/
if($this->BelongsTo == "unknown"){
$display= $this->show_header(_("Add printer extension"),
- _("Could not intialize printer tab, parameter parent was missing while construction."),TRUE,TRUE);
+ _("Could not initialize printer tab, parameter parent was missing while construction."),TRUE,TRUE);
return($display);
}
$smarty->assign("driverInfo", $ppdManager->loadDescription($path.$this->gotoPrinterPPD));
}
}else{
- $smarty->assign("driverInfo", _("not defined"));
+ $smarty->assign("driverInfo", _("Not defined"));
}
}else{
- $smarty->assign("driverInfo",_("can't get ppd informations."));
+ $smarty->assign("driverInfo",_("Can't get ppd informations."));
}
/* Create user & admin user list */
if($this->BelongsTo == "Printer"){
$this->netConfigDNS->cn= $this->cn;
$smarty->assign("netconfig", $this->netConfigDNS->execute());
+
+ /* Display sub dialog from network settings */
+ if($this->netConfigDNS->dialog){
+ $this->dialog = TRUE;
+ return($this->netConfigDNS->execute());
+ }else{
+ $this->dialog = FALSE;
+ }
} else {
$smarty->assign("netconfig", "");
}
+
return($display.$smarty->fetch (get_template_path('printer.tpl', TRUE)));
}
$this->netConfigDNS->remove_from_parent();
$ldap->rmdir($this->dn);
show_ldap_error($ldap->get_error(), _("Removing printer failed"));
- $this->handle_post_events("remove");
+ $this->handle_post_events("remove",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
if($this->BelongsTo == "Printer"){
$ui= get_userinfo();
$acl= get_permissions ($dn, $ui->subtreeACL);
- $acl= get_module_permission($acl, "printgeneric", $this->dn);
+ $acl= get_module_permission($acl, "printgeneric", $dn);
if (chkacl($acl, "create") != ""){
$message[]= _("You have no permissions to create a printer on this 'Base'.");
}
$ldap->ls("(cn=".$this->cn.")","ou=printers,ou=systems,".$this->base, array("cn"));
if ($ldap->count() != 0){
while ($attrs= $ldap->fetch()){
+ if(preg_match("/cn=dhcp,/",$attrs['dn'])){
+ continue;
+ }
if ($attrs['dn'] != $this->orig_dn){
$message[]= sprintf (_("There is already an entry '%s' in the base choosen by you"), $this->cn);
break;
if($this->PPDdialogToSave){
$this->PPDdialogToSave->save_ppd();
}
+ if($this->orig_dn != $this->dn){
+ $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
+ $this->PPDdialogToSave->cn = $this->cn;
+ $this->PPDdialogToSave->generateProperties();
+ $this->PPDdialogToSave->update_ppd_url();
+ }
/* Remove previously selected ppd file.*/
if($this->initial_PPD != $this->gotoPrinterPPD){
}
$ldap->add($this->attrs);
- $this->handle_post_events("add");
+ $this->handle_post_events("add",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
} else {
if ($this->orig_dn != $this->dn){
$this->move($this->orig_dn, $this->dn);
$this->cleanup();
$ldap->modify ($this->attrs);
- $this->handle_post_events("modify");
+ $this->handle_post_events("modify",array("macAddress" => $this->netConfigDNS->macAddress,"ipHostNumber" => $this->netConfigDNS->ipHostNumber));
}
show_ldap_error($ldap->get_error(), _("Saving printer failed"));
$this->netConfigDNS->save($this->dn);
}
- /* Optionally execute a command after we're done */
- $this->postcreate();
-
/* This is a multi object. Handle tagging here... */
$this->handle_object_tagging();
}