]> git.proxmox.com Git - pmg-api.git/commit
fix #2622: include all spam levels in total spam statistic
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 3 Mar 2020 08:33:35 +0000 (09:33 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 3 Mar 2020 09:11:32 +0000 (10:11 +0100)
commitf7f689cecd05e64bd2a19e5b3f394dea2d3901b8
treea2dd8ba0eb9164c6e74e6143b19af90241ca345e
parent1625489db0feb1a7e7f464a2c161d50e55e3d3f3
fix #2622: include all spam levels in total spam statistic

by using 'LIMIT 10' for the spamlevels, we only got the first
10 spamlevels back from the database. This is only ok if there are
only <= 10 different spamlevels in the database, but not if there are
more, as then the bucket for spamlevel >= 10 missed entries.

The call site of this uses the combined spam count of this query
result for calculating the 'rest' (meaning the mails with spam level
0), but this is obviously wrong if not all spamlevels are counted so
simply return all available levels.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/PMG/Statistic.pm