summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/account.php10
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;