Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-viewer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnew-gh <github@hazelden.ca>2021-05-03 17:20:49 +0300
committerjnew-gh <github@hazelden.ca>2021-05-03 17:20:49 +0300
commit05320038a08931976bc9bdff6eb9d02120bfa963 (patch)
tree301f4f678f40a58691a4e816e2476f25a53a5ce9
parentb87187f448ed6bf9eedb013ad2d0db3d31aca1a9 (diff)
Avoid SQL error if DMARC Result or Report Status chosen as initial sort column
Temporary fix to avoid an SQL error if DMARC Result or Report Status column sorting is set when "Save Current Settings as initial View" is selected. These two columns aren't in the database (only in the html table) and so can't be in the SQL statement.
-rw-r--r--dmarcts-report-viewer.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/dmarcts-report-viewer.js b/dmarcts-report-viewer.js
index 904577c..046479f 100644
--- a/dmarcts-report-viewer.js
+++ b/dmarcts-report-viewer.js
@@ -571,6 +571,11 @@ function build_cookie() {
sort = 1;
}
+ if ( sort_column == "" ) {
+ sort_column = "maxdate";
+ alert("Unfortuantely at this time, neither the DMARC Result nor the Report Status columns can be saved as initial sort columns. The initial sort column has been set to End Date, " + (sort == 0 ? "descending." : "ascending."));
+ }
+
// Create cookie_value object that gets placed into cookie
// When a new option is added, check the size of the cookie stored. The cookie size should be less than half of the maximum cookie size allowed per domain.