diff options
author | Michael Tänzer <neo@nhng.de> | 2014-12-04 18:26:23 +0100 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2014-12-04 18:26:23 +0100 |
commit | b0904b2bda37b292fa5d29d5d3b7ec64d100ad16 (patch) | |
tree | a10f5fb0dfefccc4bbf5890d02f273ef770ba4b6 /CommModule | |
parent | c7c4d077688807bcbec21e11d0aeb0af9ebfbd30 (diff) | |
download | cacert-HEAD.tar.gz cacert-HEAD.tar.xz cacert-HEAD.zip |
Diffstat (limited to 'CommModule')
-rwxr-xr-x | CommModule/client.pl | 4 | ||||
-rwxr-xr-x | CommModule/usbclient.pl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl index bd3eb02..25e6a73 100755 --- a/CommModule/client.pl +++ b/CommModule/client.pl @@ -31,7 +31,7 @@ use DBI; use Locale::gettext; use IO::Socket; use MIME::Base64; -use Digest::SHA1 qw(sha1_hex); +use Digest::SHA qw(sha1_hex); #Protocol version: my $ver=1; @@ -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; |