summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b6ca2e)
raw | patch | inline | side by side (parent: 1b6ca2e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Apr 2006 04:29:05 +0000 (04:29 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Apr 2006 04:29:05 +0000 (04:29 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3129 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index e18bf2409d5411060e8d21610f33d79b226a341f..51b124383034e151f792c4f8f3d8ada7428008b6 100644 (file)
$this->base= dn2base($ui->dn);
$this->cn= "";
} else {
- $this->base= dn2base($this->dn);
+
+ /* Set base and check if the extracted base exists */
+ $this->base= preg_replace("/ou=printers,ou=systems,/","",dn2base($this->dn));
+ if(!isset($this->config->idepartments[$this->base])){
+ print_red(_("Can't extract a valid base out of object dn, setting base to '%s'."),$_SESSION['CurrentMainBase']);
+ $this->base = $_SESSION['CurrentMainBase'];
+ }
}
/* Extract selected ppd */
if(($this->BelongsTo == "Printer") && (empty($this->cn))){
$message[]= "The required field 'Printer name' is not set.";
}
-
+
/* Check if there is already an entry with this cn*/
if (($this->orig_dn != $dn)&&($this->BelongsTo == "Printer")){
$ldap= $this->config->get_ldap_link();