]> source.dussan.org Git - rspamd.git/commitdiff
Add check for all thresholds
authorfiredranzer <rupeshharode@gmail.com>
Mon, 5 Mar 2018 17:43:50 +0000 (23:13 +0530)
committerfiredranzer <rupeshharode@gmail.com>
Mon, 5 Mar 2018 17:43:50 +0000 (23:13 +0530)
interface/js/app/config.js

index c6d4a9b488056d1c901e3add2fb32b02bfc8a814..d591abd53925ff70c2612c7e11caaa53bf738245 100644 (file)
@@ -219,7 +219,7 @@ function($) {
                     var elts = loadActionsFromForm();
                     // String to array for comparison
                     var eltsArray = JSON.parse(loadActionsFromForm());
-                    if(eltsArray[2]>=0){
+                    if(eltsArray[0]>=0 && eltsArray[1]>=0 && eltsArray[2]>=0){
                         rspamd.queryNeighbours('saveactions', null, null, "POST", {}, {
                             data: elts,
                             dataType: "json",
@@ -233,7 +233,7 @@ function($) {
                     var elts = loadActionsFromForm();
                     // String to array for comparison
                     var eltsArray = JSON.parse(loadActionsFromForm());
-                    if(eltsArray[2]>=0){
+                    if(eltsArray[0]>=0 && eltsArray[1]>=0 && eltsArray[2]>=0){
                         rspamd.queryLocal('saveactions', null, null, "POST", {}, {
                             data: elts,
                             dataType: "json",