diff options
author | Michael Tänzer <neo@nhng.de> | 2014-03-21 17:15:23 +0100 |
---|---|---|
committer | Michael Tänzer <neo@nhng.de> | 2014-03-21 17:15:23 +0100 |
commit | ecd7c1033d881d51b54926075cfca3e9cd19a34d (patch) | |
tree | 7d0a758596fea01d772b302ceb5020bdf8e778df | |
parent | 56f0ddf35014a7c6384b09f386c3b84f3b59b183 (diff) | |
parent | cff982918cd654ab9028ecc10b1ea3b2592ad9be (diff) | |
download | cacert-devel-ecd7c1033d881d51b54926075cfca3e9cd19a34d.tar.gz cacert-devel-ecd7c1033d881d51b54926075cfca3e9cd19a34d.tar.xz cacert-devel-ecd7c1033d881d51b54926075cfca3e9cd19a34d.zip |
Merge branch 'bug-1221' into testserver-stable
Conflicts:
www/wot.php
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rwxr-xr-x | CommModule/client.pl | 2 | ||||
-rwxr-xr-x | CommModule/usbclient.pl | 2 | ||||
-rw-r--r-- | includes/lib/account.php | 6 | ||||
-rw-r--r-- | www/wot.php | 3 |
4 files changed, 8 insertions, 5 deletions
diff --git a/CommModule/client.pl b/CommModule/client.pl index 8b29d62..9c93245 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)?30:3; 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; diff --git a/includes/lib/account.php b/includes/lib/account.php index 81bd59b..07d44aa 100644 --- a/includes/lib/account.php +++ b/includes/lib/account.php @@ -51,7 +51,8 @@ function fix_assurer_flag($userID = NULL) SELECT SUM(`points`) FROM `notary` AS `n` WHERE `n`.`to` = `u`.`id` AND (`n`.`expire` > now() - OR `n`.`expire` IS NULL) and `n`.`deleted` = 0 + OR `n`.`expire` IS NULL) + AND `n`.`deleted` = 0 ) >= 100'; $query = mysql_query($sql); @@ -85,7 +86,8 @@ function fix_assurer_flag($userID = NULL) AND ( `n`.`expire` > now() OR `n`.`expire` IS NULL - ) and `n`.`deleted` = 0 + ) + AND `n`.`deleted` = 0 ) < 100 )'; diff --git a/www/wot.php b/www/wot.php index e0b9d91..17f3da8 100644 --- a/www/wot.php +++ b/www/wot.php @@ -366,7 +366,8 @@ function send_reminder() `to`='".$_SESSION['_config']['notarise']['id']."' AND `awarded`='$awarded' AND `location`='".mysql_real_escape_string(stripslashes($_POST['location']))."' AND - `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."' and `deleted` = 0"; + `date`='".mysql_real_escape_string(stripslashes($_POST['date']))."' and `deleted` = 0 + `deleted`=0"; $res = mysql_query($query); if(mysql_num_rows($res) > 0) { |