Fixes wrong alerts sort column causing queries to fail

Fixes #3006
This commit is contained in:
Simone Mainardi 2019-10-25 14:11:49 +02:00
parent 1d5ff7c4e7
commit f942ec3a1c

View file

@ -46,7 +46,10 @@ end
if(tonumber(_GET["currentPage"]) == nil) then _GET["currentPage"] = 1 end
if(tonumber(_GET["perPage"]) == nil) then _GET["perPage"] = getDefaultTableSize() end
if(isEmptyString(_GET["sortColumn"]) or (_GET["sortColumn"] == "column_") or (status ~= "historical" and _GET["sortColumn"] == "column_sort")) then
if(isEmptyString(_GET["sortColumn"]) or (_GET["sortColumn"] == "column_") or (status ~= "historical" and _GET["sortColumn"] == "column_sort")) or (status ~= "historical-flows" and _GET["sortColumn"] == "column_count") then
if status ~= "historical-flows" and _GET["sortColumn"] == "column_count" then
tablePreferences("sort_alerts", "column_")
end
_GET["sortColumn"] = getDefaultTableSort("alerts")
elseif((_GET["sortColumn"] ~= "column_") and (_GET["sortColumn"] ~= "")) then
tablePreferences("sort_alerts", _GET["sortColumn"])