summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2012-05-08 22:39:45 +0200
committerMichael Tänzer <neo@nhng.de>2012-05-08 22:39:45 +0200
commit10df9bdc7b40c5ddbea02e92f0af6b1fcf8f01bf (patch)
tree177f098399aa57483db38af62bfd51dda8325476
parent3aacc6db438b98a515ce6f4ed42c68e4d06f63ea (diff)
downloadcacert-devel-bug-1025.tar.gz
cacert-devel-bug-1025.tar.xz
cacert-devel-bug-1025.zip
bug 1025: Correct name clash of variables and loose comparisonbug-1025
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--www/disputes.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/www/disputes.php b/www/disputes.php
index 5b78c1e..e86a0fa 100644
--- a/www/disputes.php
+++ b/www/disputes.php
@@ -72,11 +72,11 @@
mysql_query($query);
}
mysql_query("update `disputeemail` set hash='',action='accept' where `id`='$emailid'");
- $rc = mysql_num_rows(mysql_query("select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
- $rc = mysql_num_rows(mysql_query("select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
- $res = mysql_query("select * from `users` where `id`='$oldmemid'");
- $user = mysql_fetch_assoc($res);
- if($rc == 0 && $rc2 == 0 && $_SESSION['_config']['email'] == $user['email'])
+ $domaincount = mysql_num_rows(mysql_query("select * from `domains` where `memid`='$oldmemid' and `deleted`=0"));
+ $emailcount = mysql_num_rows(mysql_query("select * from `email` where `memid`='$oldmemid' and `deleted`=0 and `id`!='$emailid'"));
+ $res = mysql_query("select * from `users` where `id`='$oldmemid'");
+ $user = mysql_fetch_assoc($res);
+ if($domaincount === 0 && $emailcount === 0 && $_SESSION['_config']['email'] === $user['email'])
{
mysql_query("update `users` set `deleted`=NOW() where `id`='$oldmemid'");
echo _("This was the primary email on the account, and no emails or domains were left linked so the account has also been removed from the system.");