Code

printer update
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Apr 2006 12:36:41 +0000 (12:36 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Apr 2006 12:36:41 +0000 (12:36 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3072 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index d44b62dd96fe3c8db74bb7037e4d6850bad4347b..d70986981b0fc67c1f4c45b186b419cf6b231b76 100644 (file)
@@ -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"));