Only allow priority to be reset to null.
authorMaxime Bourget <bmx007@gmail.com>
Fri, 7 Jun 2013 09:26:02 +0000 (10:26 +0100)
committerMaxime Bourget <bmx007@gmail.com>
Fri, 7 Jun 2013 09:26:02 +0000 (10:26 +0100)
includes/order_lines.inc

index d94c4dea7e35d4e5c19eb2559e9935fe427b5277..e8d161224d3e21a135abf973441c58df0a79a35d 100644 (file)
@@ -42,7 +42,8 @@ begin_transaction();
                        if(isset($values[$date_field])) {
                                $input_date = trim($values[$date_field]);
                                if($input_date == "")  {
-                                       array_push($set," $date_field = NULL");
+                                       // Only the priority field can be set to null.
+                                       if($date_field == 'priority') array_push($set," $date_field = NULL");
                                } else {
                                        $date = date2sql($input_date);
                                        array_push($set," $date_field='$date' ");