Code

Fixed flag handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Jan 2006 12:12:59 +0000 (12:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 18 Jan 2006 12:12:59 +0000 (12:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2522 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_glpiPrinterAccount.inc
plugins/admin/systems/glpiPrinter.tpl

index ce2cfaca4874e26850baa30ab0cbf3c8172cb32b..624ba23a549b2df0db94151e2fa2623cf59ff8c4 100644 (file)
@@ -485,11 +485,13 @@ class glpiPrinterAccount extends plugin
       }
     }
 
-    foreach(array("flags_serial","flags_par","flags_usb") as $checkboxes){
-      if(isset($_POST[$checkboxes])){
-        $this->$checkboxes = 1;
-      }else{
-        $this->$checkboxes = 0;
+    if(isset($_POST['glpiPrinterFlagsPosted'])){
+      foreach(array("flags_serial","flags_par","flags_usb") as $checkboxes){
+        if(isset($_POST[$checkboxes])){
+          $this->$checkboxes = 1;
+        }else{
+          $this->$checkboxes = 0;
+        }
       }
     }
 
index c39167446ad3f97c11f4a80f989e1696767ca447..03a758cf3c779717ed594fe61580751ce0f1ce14 100644 (file)
@@ -75,6 +75,7 @@
                                        </td>
                                </tr>
                        </table>
+                       <input name="glpiPrinterFlagsPosted" value="1" type="hidden">
                </td>
                <td style="border-left: 1px solid rgb(160, 160, 160); vertical-align: top; padding-right: 5px;">
                        <h2>{t}Information{/t}</h2>