diff options
author | Felix Dörre <felix@dogcraft.de> | 2015-04-07 21:17:19 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2015-04-29 20:36:37 +0200 |
commit | a33a127a7a89309e426593414ee633338be2517c (patch) | |
tree | 450eec4fd548e5dfd507924e3b5ce046b1b1d1ff | |
parent | 16cb7044fa31e618f969d6104d976a7bc087e1be (diff) | |
download | cacert-devel-bug-1053.tar.gz cacert-devel-bug-1053.tar.xz cacert-devel-bug-1053.zip |
bug-1053: new points calculation in includes/account.phpbug-1053
-rw-r--r-- | includes/account.php | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/includes/account.php b/includes/account.php index 6dacf2d..843dbe6 100644 --- a/includes/account.php +++ b/includes/account.php @@ -1275,10 +1275,7 @@ function buildSubjectFromSession() { if($oldid == 13 && $process != "") { - $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".intval($_SESSION['profile']['id'])."' and `deleted` = 0 group by `to`"; - $ddres = mysql_query($ddquery); - $ddrow = mysql_fetch_assoc($ddres); - $_SESSION['profile']['points'] = $ddrow['total']; + update_points_in_profile(); if($_SESSION['profile']['points'] == 0) { @@ -1337,10 +1334,7 @@ function buildSubjectFromSession() { $_SESSION['profile'] = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".intval($_SESSION['profile']['id'])."'")); $_SESSION['profile']['loggedin'] = 1; - $ddquery = "select sum(`points`) as `total` from `notary` where `to`='".intval($_SESSION['profile']['id'])."' and `deleted` = 0 group by `to`"; - $ddres = mysql_query($ddquery); - $ddrow = mysql_fetch_assoc($ddres); - $_SESSION['profile']['points'] = $ddrow['total']; + update_points_in_profile(); $id = 13; |