summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b0394a)
raw | patch | inline | side by side (parent: 1b0394a)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Jun 2009 05:59:28 +0000 (05:59 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 19 Jun 2009 05:59:28 +0000 (05:59 +0000) |
-If a printer was new, we weren't able to add a ppd driver.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13735 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13735 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc | patch | blob | history | |
gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc
index 117f5ee612e8b00c3ff6d3f87c956c5c0414a635..9473158f32063f23800ca56d54e9ac7478edce18 100644 (file)
if($this->PPDdialogToSave && is_object($this->PPDdialogToSave)){
$this->dialog = $this->PPDdialogToSave;
}else{
-
+
if(is_array($this->gotoPrinterPPD)){
$this->dialog = new printerPPDDialog($this->config, $this->dn,"");
}else{
}
$this->dialog->cn= $this->cn;
}
+
+ // Detect edit acl base
+ $ldap = $this->config->get_ldap_link();
+ if($ldap->dn_exists($this->dn)){
+ $acl_base = $this->dn;
+ }else{
+ $acl_base = $this->base;
+ }
+
+ $this->dialog->set_acl_base($acl_base);
}
/* remove ppd */
/* save ppd configuration */
if($this->PPDdialogToSave && is_object($this->PPDdialogToSave)){
+
$this->PPDdialogToSave->save_ppd();
/* Rename the generated ppd to match the gzip ending '.gz', if necessary.
}
}
}
- if($this->orig_dn != $this->dn){
+ if($this->orig_dn != $this->dn && $this->orig_dn != "new"){
if(!empty($this->gotoPrinterPPD)) {
$this->PPDdialogToSave = new printerPPDDialog($this->config, $this->dn,$this->gotoPrinterPPD);
$this->PPDdialogToSave->cn = $this->cn;
}
/* If no ppd is selected, remove this attribute */
- if(!empty($this->gotoPrinterPPD) && $this->initially_was_account) {
+ if(!empty($this->gotoPrinterPPD)) {
$this->gotoPrinterPPD = $this->ppdServerPart.'/'.$this->gotoPrinterPPD;
}else{
$this->gotoPrinterPPD = array();
diff --git a/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc b/gosa-plugins/goto/admin/systems/ppd/class_printerPPDDialog.inc
index 8fa944bcd504cafdd2f1abf34f5f112b62e7cd88..be43f441ad5ef534615ef5e9894986012ed2343a 100644 (file)
$smarty->assign("ppdString", _("Can't get ppd informations."));
$smarty->assign("showOptions", "");
$smarty->assign("path_valid", TRUE);
- $smarty->assign("acl",$this->ui->get_permissions($this->dn,"printer/printgeneric","gotoPrinterPPD"));
+ $smarty->assign("acl",$this->ui->get_permissions($this->acl_base,"printer/printgeneric","gotoPrinterPPD"));
- $acl = $this->ui->get_permissions($this->dn,"printer/printgeneric","gotoPrinterPPD");
+ $acl = $this->ui->get_permissions($this->acl_base,"printer/printgeneric","gotoPrinterPPD");
if(empty($this->pathToPPD)){
return;
}
- if(preg_match("/w/",$this->ui->get_permissions($this->dn,"printer/printgeneric","gotoPrinterPPD"))){
+ if(preg_match("/w/",$this->ui->get_permissions($this->acl_base,"printer/printgeneric","gotoPrinterPPD"))){
foreach($this->ppdConfig as $cat => $obj){
foreach($obj as $attr => $attributes){
if(isset($_POST[base64_encode($attributes['_name'])])){
}
$acl ="";
- if(!preg_match("/w/",$this->ui->get_permissions($this->dn,"printer/printgeneric","gotoPrinterPPD"))){
+ if(!preg_match("/w/",$this->ui->get_permissions($this->acl_base,"printer/printgeneric","gotoPrinterPPD"))){
$acl = "disabled";
}