From: hickert Date: Thu, 20 Apr 2006 12:36:41 +0000 (+0000) Subject: printer update X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5eaf5d0494473a3b795a42e2fd10fd43babb81fa;p=gosa.git printer update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3072 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index d44b62dd9..d70986981 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -91,7 +91,7 @@ class printgeneric extends plugin $this->base= dn2base($ui->dn); $this->cn= ""; } else { - $this->base= preg_replace ("/^[^,]+,[^,]+,[^,]+,/", "", $this->dn); + $this->base= dn2base($this->dn); } /* Extract selected ppd */ @@ -582,7 +582,7 @@ class printgeneric extends plugin } } - $this->dn= "cn=".$this->cn.",ou=printers,ou=systems,".$this->base; + $dn= "cn=".$this->cn.",ou=printers,ou=systems,".$this->base; /* must: cn */ if(($this->BelongsTo == "Printer") && (empty($this->cn))){ @@ -590,7 +590,7 @@ class printgeneric extends plugin } /* Check if there is already an entry with this cn*/ - if (($this->orig_dn != $this->dn)&&($this->BelongsTo == "Printer")){ + if (($this->orig_dn != $dn)&&($this->BelongsTo == "Printer")){ $ldap= $this->config->get_ldap_link(); $ldap->cd ($this->base); $ldap->ls("(cn=".$this->cn.")","ou=printers,ou=systems,".$this->base, array("cn"));