Code

Added magic_quotes fix for Profile
[gosa.git] / plugins / admin / systems / class_printerPPDSelectionDialog.inc
index b10357b9d056ca6fc703002375cfde08642b1a76..78935b9d1b9f0a344b55333f3e08b8ccb46d0393 100644 (file)
@@ -30,8 +30,10 @@ class printerPPDSelectionDialog extends plugin
      */
     if(isset($ppd)){
       $tmp2 = split("\n",$ppd['ppd']);
-      $this->currentPos = $tmp2[0];
-      $this->currentSel = preg_replace("/^ -/","",$tmp2[1]);
+      if(count($tmp2)==2){
+        $this->currentPos = $tmp2[0];
+        $this->currentSel = preg_replace("/^ -/","",$tmp2[1]);
+      }
     }
   
     /* Order the manufacturers index */
@@ -82,7 +84,7 @@ class printerPPDSelectionDialog extends plugin
     $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
       " <input type='image' align='middle' src='images/list_back.png' title='"._("Reset list")."' alt='"._("Up")."' name='dep_back'>&nbsp;".
       " <img src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;".
-      " <input type='image' align='middle' src='images/list_new_user.png' title='"._("Upload PPD")."' alt='"._("Uppload PPD")."' name='upload'>&nbsp;".
+      " <input type='image' align='middle' src='images/list_new_user.png' title='"._("Upload PPD")."' alt='"._("Upload PPD")."' name='upload'>&nbsp;".
       "</div>";
 
     /* Create new list*/