diff options
author | Michael Tänzer <neo@nhng.de> | 2014-03-21 16:30:06 +0100 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2014-03-21 16:30:06 +0100 |
commit | 7aa13b258f4b47c7ad41c49cd6983c9e4876ff61 (patch) | |
tree | a7c85c04281478d9f5e2e6c7014d167c245db498 /CommModule | |
parent | b8e82fe975ba7971c2b5f166ad14bfc162cf3d67 (diff) | |
download | cacert-devel-7aa13b258f4b47c7ad41c49cd6983c9e4876ff61.tar.gz cacert-devel-7aa13b258f4b47c7ad41c49cd6983c9e4876ff61.tar.xz cacert-devel-7aa13b258f4b47c7ad41c49cd6983c9e4876ff61.zip |
bug 1221: Ignore deleted assurances when calculating the cert validity
period
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'CommModule')
-rwxr-xr-x | CommModule/client.pl | 2 | ||||
-rwxr-xr-x | CommModule/usbclient.pl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl index bf92b27..1d87adb 100755 --- a/CommModule/client.pl +++ b/CommModule/client.pl @@ -441,7 +441,7 @@ sub calculateDays($) { if($_[0]) { - my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' group by `to`"); + my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' and `deleted`=0 group by `to`"); SysLog("Summe: $sum[0]\n") if($debug); return ($sum[0]>=50)?730:180; diff --git a/CommModule/usbclient.pl b/CommModule/usbclient.pl index 3cbe2c3..6cbc111 100755 --- a/CommModule/usbclient.pl +++ b/CommModule/usbclient.pl @@ -425,7 +425,7 @@ sub calculateDays($) { if($_[0]) { - my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' group by `to`"); + my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' and `deleted`=0 group by `to`"); SysLog("Summe: $sum[0]\n") if($debug); return ($sum[0]>=50)?730:180; |