From 4848d4d04d2b8a8588eed30ee893feb51730450b Mon Sep 17 00:00:00 2001 From: root Date: Sun, 5 Apr 2009 00:30:33 +0000 Subject: [PATCH] http://bugs.cacert.org/view.php?id=588 --- includes/account.php | 18 ++++++++++-------- includes/account_stuff.php | 2 +- includes/general.php | 32 +++++++++++++++++++++----------- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/includes/account.php b/includes/account.php index a614431..0f2b18e 100644 --- a/includes/account.php +++ b/includes/account.php @@ -1110,10 +1110,11 @@ if($oldid == 13 && $process != "") { - $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`"; - $ddres = mysql_query($ddquery); - $ddrow = mysql_fetch_assoc($ddres); - $_SESSION['profile']['points'] = $ddrow['total']; + $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`"; + $ddres = mysql_query($ddquery); + $ddrow = mysql_fetch_assoc($ddres); + $_SESSION['profile']['points'] = $ddrow['total']; + if($_SESSION['profile']['points'] == 0) { $_SESSION['_config']['user']['fname'] = trim(mysql_real_escape_string(stripslashes(strip_tags($_REQUEST['fname'])))); @@ -1179,10 +1180,10 @@ $_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_SESSION['profile']['id']."'")); $_SESSION['profile']['loggedin'] = 1; - $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`"; - $ddres = mysql_query($ddquery); - $ddrow = mysql_fetch_assoc($ddres); - $_SESSION['profile']['points'] = $ddrow['total']; + $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`"; + $ddres = mysql_query($ddquery); + $ddrow = mysql_fetch_assoc($ddres); + $_SESSION['profile']['points'] = $ddrow['total']; $id = 13; @@ -2715,6 +2716,7 @@ { mysql_query("insert into `notary` set `from`='0', `to`='$memid', `points`='$points', `method`='Thawte Points Transfer', `when`=NOW()"); + fix_assurer_flag($memid); } $totalpoints = intval($tmp['points']) + $points; diff --git a/includes/account_stuff.php b/includes/account_stuff.php index 3031952..57a574c 100644 --- a/includes/account_stuff.php +++ b/includes/account_stuff.php @@ -217,7 +217,7 @@ function hideall() {