diff options
author | dirk <beliebige_email_adresse@fidocon.de> | 2011-08-17 01:03:19 +0200 |
---|---|---|
committer | dirk <beliebige_email_adresse@fidocon.de> | 2011-08-17 01:03:19 +0200 |
commit | 443cafa2003738f9b2d34fdb1cad38528943fc46 (patch) | |
tree | e81198eccc2f5e9d52abe4857e90b03c8f5deca7 /includes/wot.inc.php | |
parent | d3b6033b790f7cbb7fbaa5f07f237b08ff28fe79 (diff) | |
download | cacert-devel-443cafa2003738f9b2d34fdb1cad38528943fc46.tar.gz cacert-devel-443cafa2003738f9b2d34fdb1cad38528943fc46.tar.xz cacert-devel-443cafa2003738f9b2d34fdb1cad38528943fc46.zip |
modified top assurer/assuree list, missing ;, wrong ; and changed CATS behavior
Diffstat (limited to 'includes/wot.inc.php')
-rw-r--r-- | includes/wot.inc.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/includes/wot.inc.php b/includes/wot.inc.php index e8b0448..d7c4b13 100644 --- a/includes/wot.inc.php +++ b/includes/wot.inc.php @@ -35,7 +35,7 @@ function get_number_of_assurances ($userid) { $res = query_init ("SELECT `users`. *, count(*) AS `list` FROM `users`, `notary` - WHERE `users`.`id` = `notary`.`from` AND `notary`.`from` != `notary`.`to` AND `from`='".intval($userid)."' + WHERE `users`.`id` = `notary`.`from` AND `notary`.`method` = 'Face to Face Meeting' AND `from`='".intval($userid)."' GROUP BY `notary`.`from`"); $row = query_getnextrow($res); @@ -45,7 +45,7 @@ function get_number_of_assurees ($userid) { $res = query_init ("SELECT `users`. *, count(*) AS `list` FROM `users`, `notary` - WHERE `users`.`id` = `notary`.`to` AND `notary`.`from` != `notary`.`to` AND `to`='".intval($userid)."' + WHERE `users`.`id` = `notary`.`to` AND `notary`.`method` = 'Face to Face Meeting' AND `to`='".intval($userid)."' GROUP BY `notary`.`to`"); $row = query_getnextrow($res); @@ -56,6 +56,7 @@ { $res = query_init ("SELECT count(*) AS `list` FROM `users` inner join `notary` on `users`.`id` = `notary`.`from` + WHERE `notary`.`method` = 'Face to Face Meeting' GROUP BY `notary`.`from` HAVING count(*) > '".intval($no_of_assurances)."'"); return intval(query_get_number_of_rows($res)+1); } @@ -64,6 +65,7 @@ { $res = query_init ("SELECT count(*) AS `list` FROM `users` inner join `notary` on `users`.`id` = `notary`.`to` + WHERE `notary`.`method` = 'Face to Face Meeting' GROUP BY `notary`.`to` HAVING count(*) > '".intval($no_of_assurees)."'"); return intval(query_get_number_of_rows($res)+1); } @@ -276,15 +278,6 @@ <? } - function output_cats_needed() - { -?> - <tr> - <td class="DataTD" colspan=4><strong style='color: red'><?=_("You have to pass the CAcert Assurer Challenge (CATS-Test) to be an Assurer")?></strong></td> - </tr> -<? - } - // ************* output given assurances ****************** @@ -313,7 +306,7 @@ { $fromuser = get_user (intval($row['from'])); calc_assurances ($row,$points,$experience,$sum_experience,$awarded); - $name = show_user_link ($fromuser['fname']." ".$fromuser['lname'],intval($row['to'])); + $name = show_user_link ($fromuser['fname']." ".$fromuser['lname'],intval($row['from'])); output_assurances_row (intval($row['id']),$row['date'],$name,$awarded,$row['location'],$row['method']==""?"":_(sprintf("%s", $row['method'])),$experience); } } @@ -416,7 +409,7 @@ else { $sum_points_countable = $sum_points; - $remark_points = " "; + $remark_points = " "; } if ($sum_experience > $max_experience) { @@ -443,7 +436,7 @@ if ($sum_points_countable < $max_points) { if ($sum_experience_countable != 0) - $remark_experience = $points_on_hold_txt;_("Points on hold due to less assurance points"); + $remark_experience = _("Points on hold due to less assurance points"); $sum_experience_countable = 0; if ($sum_experience_other_countable != 0) $remark_experience_other = _("Points on hold due to less assurance points"); @@ -453,7 +446,15 @@ $issue_points = 0; $cats_test_passed = get_cats_state ($userid); if ($cats_test_passed == 0) + { $issue_points_txt = "<strong style='color: red'>"._("You have to pass the CAcert Assurer Challenge (CATS-Test) to be an Assurer")."</strong>"; + if ($sum_points_countable < $max_points) + { + $issue_points_txt = "<strong style='color: red'>"; + $issue_points_txt .= sprintf(_("You need %s assurance points and the passed CATS-Test to be an Assurer"), intval($max_points)); + $issue_points_txt .= "</strong>"; + } + } else { $experience_total = $sum_experience_countable+$sum_experience_other_countable; |