diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 12b80670eaf80058aeb026814318fb5ff09c6023..a3a3f34a32a3c694878816caa2007b5a0ec7c8fe 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 */
/* Delete references to object groups */
$ldap->cd ($this->config->current['BASE']);
- $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".$this->dn."))", array("cn"));
+ $ldap->search ("(&(objectClass=gosaGroupOfNames)(member=".LDAP::prepare4filter($this->dn)."))", array("cn"));
while ($ldap->fetch()){
$og= new ogroup($this->config, $ldap->getDN());
unset($og->member[$this->dn]);
/* must: cn */
if(($this->BelongsTo == "Printer") && (empty($this->cn))){
- $message[]= "The required field 'Printer name' is not set.";
+ $message[]= _("The required field 'Printer name' is not set.");
+ }
+
+ /* must: cn */
+ if(($this->BelongsTo == "Printer") && !is_dns_name($this->cn)){
+ $message[]= _("Invalid character in printer name.");
}
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'.");
}
$this->PPDdialogToSave->save_ppd();
}
+ if($this->orig_dn != $this->dn && $this->initially_was_account){
+ if(!empty($this->gotoPrinterPPD)) {
+ $this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
+ $this->PPDdialogToSave->cn = $this->cn;
+ $this->PPDdialogToSave->generateProperties();
+ $this->gotoPrinterPPD = $this->PPDdialogToSave->update_ppd_url();
+ }
+ }
+
/* Remove previously selected ppd file.*/
- if($this->initial_PPD != $this->gotoPrinterPPD){
+ if($this->initial_PPD != $this->gotoPrinterPPD && $this->initially_was_account){
if(!empty($this->initial_PPD)){
$tmp = new printerPPDDialog($this->config, $this->dn,$this->initial_PPD);
$tmp->removeModifiedPPD();
$this->netConfigDNS->dn = $this->dn;
$this->netConfigDNS->save($this->dn);
}
-
- /* This is a multi object. Handle tagging here... */
- $this->handle_object_tagging();
}
function generateList(){