summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xCommModule/client.pl2
-rwxr-xr-xCommModule/usbclient.pl2
-rw-r--r--includes/lib/account.php6
-rw-r--r--www/wot.php3
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)
{