summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authordirk <beliebige_email_adresse@fidocon.de>2011-10-26 00:19:10 +0200
committerdirk <beliebige_email_adresse@fidocon.de>2011-10-26 00:19:10 +0200
commit32a12f0e40e4bb6fc1bc4d958d88d4df13f0146b (patch)
treeb626e91bc3edb19ffd4bec27a2890e87de1aed98 /includes
parent44959a0d3734ea36e1beb1b60074b6fd35ee2c40 (diff)
downloadcacert-devel-32a12f0e40e4bb6fc1bc4d958d88d4df13f0146b.tar.gz
cacert-devel-32a12f0e40e4bb6fc1bc4d958d88d4df13f0146b.tar.xz
cacert-devel-32a12f0e40e4bb6fc1bc4d958d88d4df13f0146b.zip
bug-882 awarded/points-functionality for support
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 3651ea5..4c8b4d2 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)
@@ -357,10 +358,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']),$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,$row['location'],$row['method']==""?"":_(sprintf("%s", $row['method'])),$experience,$userid,$support,$revoked);
}
}