Code

Fixed append problem
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Nov 2005 10:53:58 +0000 (10:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 11 Nov 2005 10:53:58 +0000 (10:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1919 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 4493e0be4a690a3adaeed6e120eb18966203040f..819d495db72325b4513b7f392aa882a5db85b4b8 100644 (file)
@@ -1,5 +1,12 @@
 <?php
 
+
+
+
+
+
+
+
 class printgeneric extends plugin
 {
   /* CLI vars */
@@ -60,7 +67,7 @@ class printgeneric extends plugin
     }
 
     if(isset($this->gotoPrinterPPD)){
-      $this->gotoPrinterPPD = preg_replace("/http.*ppd\//i","",$this->gotoPrinterPPD);
+      $this->gotoPrinterPPD = preg_replace("/^http.*ppd\//i","",$this->gotoPrinterPPD);
     }
 
     /* In case of gotoWorkstation this tab is calles from workstation plugin
@@ -521,8 +528,9 @@ class printgeneric extends plugin
     }
   
     if(!is_array($this->attrs['gotoPrinterPPD'])) {
-      $str = $method.$_SERVER['SERVER_NAME']."/ppd";
+      $str = $method.$_SERVER['SERVER_NAME']."/ppd/";
       $this->attrs['gotoPrinterPPD'] = $str.$this->attrs['gotoPrinterPPD'];
+      $this->attrs['gotoPrinterPPD'] = str_replace("//","/",$this->attrs['gotoPrinterPPD']);
     }
 
     /* Append printer user