bug 1221: added `deleted` = 0 to general.php
authorBenny Baumann <BenBE@geshi.org>
Tue, 19 Nov 2013 21:56:04 +0000 (22:56 +0100)
committerBenny Baumann <BenBE@geshi.org>
Tue, 19 Nov 2013 22:24:09 +0000 (23:24 +0100)
includes/general.php

index d89c0e6..af5b63e 100644 (file)
@@ -82,7 +82,7 @@
                $locked = mysql_fetch_assoc(mysql_query("select `locked` from `users` where `id`='".$_SESSION['profile']['id']."'"));
                if($locked['locked'] == 0)
                {
-                       $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' group by `to`";
+                       $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['profile']['id']."' and `deleted` = 0 group by `to`";
                        $res = mysql_query($query);
                        $row = mysql_fetch_assoc($res);
                        $_SESSION['profile']['points'] = $row['total'];
                if($id <= 0)
                        $id = $_SESSION['profile']['id'];
 
-               $query = "select sum(`points`) as `points` from `notary` where `to`='$id' group by `to`";
+               $query = "select sum(`points`) as `points` from `notary` where `to`='$id' and `deleted` = 0 group by `to`";
                $row = mysql_fetch_assoc(mysql_query($query));
                $points = $row['points'];