summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-10-26 14:56:50 +0200
committerMichael Tänzer <neo@nhng.de>2011-10-26 14:56:50 +0200
commit10aaf4480a5182377df284f2cc1cb3a43cf4c891 (patch)
tree36357db48071340e80d89ab31e735d7e44f09544 /includes
parent9f1608a04dbad1ce45d8f14fafaa4fcc0abd4341 (diff)
parenteab65d7d64b1696114a9dc10524df7ffc24032e0 (diff)
downloadcacert-devel-10aaf4480a5182377df284f2cc1cb3a43cf4c891.tar.gz
cacert-devel-10aaf4480a5182377df284f2cc1cb3a43cf4c891.tar.xz
cacert-devel-10aaf4480a5182377df284f2cc1cb3a43cf4c891.zip
Merge branch 'bug-882' into release
Diffstat (limited to 'includes')
-rw-r--r--includes/notary.inc.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index 95cd889..73227ac 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -62,7 +62,7 @@
{
$res = query_init ("SELECT count(*) AS `list` FROM `notary`
WHERE `method` = 'Face to Face Meeting'
- GROUP BY .`to` HAVING count(*) > '".intval($no_of_assurees)."'");
+ GROUP BY `to` HAVING count(*) > '".intval($no_of_assurees)."'");
return intval(query_get_number_of_rows($res)+1);
}
@@ -106,7 +106,8 @@
function calc_experience ($row,&$points,&$experience,&$sum_experience,&$revoked)
{
- $points += $row['awarded'];
+ $apoints = max($row['points'],$row['awarded']);
+ $points += $apoints;
$experience = "&nbsp;";
$revoked = false; # to be coded later (after DB-upgrade)
if ($row['method'] == "Face to Face Meeting")
@@ -114,7 +115,7 @@
$sum_experience = $sum_experience +2;
$experience = "2";
}
- return $row['awarded'];
+ return $apoints;
}
function calc_assurances ($row,&$points,&$experience,&$sumexperience,&$awarded,&$revoked)
@@ -371,10 +372,10 @@
while($row = mysql_fetch_assoc($res))
{
$fromuser = get_user (intval($row['to']));
- calc_experience ($row,$points,$experience,$sum_experience,$revoked);
+ $apoints = calc_experience ($row,$points,$experience,$sum_experience,$revoked);
$name = show_user_link ($fromuser['fname']." ".$fromuser['lname'],intval($row['to']));
$email = show_email_link ($fromuser['email'],intval($row['to']));
- output_assurances_row (intval($row['id']),$row['date'],$row['when'],$email,$name,intval($row['awarded']),intval($row['points']),$row['location'],$row['method']==""?"":_(sprintf("%s", $row['method'])),$experience,$userid,$support,$revoked);
+ output_assurances_row (intval($row['id']),$row['date'],$row['when'],$email,$name,$apoints,intval($row['points']),$row['location'],$row['method']==""?"":_(sprintf("%s", $row['method'])),$experience,$userid,$support,$revoked);
}
}