root 2009-04-05 00:31:50 +00:00
parent d3dce07eb6
commit 24491b1c86

View file

@ -33,13 +33,15 @@
$id = $oldid; $id = $oldid;
} }
if(($id == 5 || $oldid == 5 || $id == 6 || $oldid == 6) && $_SESSION['profile']['points'] < 100) if(($id == 5 || $oldid == 5 || $id == 6 || $oldid == 6))
{ {
if (!is_assurer($_SESSION['profile']['id'])) {
showheader(_("My CAcert.org Account!")); showheader(_("My CAcert.org Account!"));
echo "<p>"._("You don't have access to view these pages.")."</p>"; echo "<p>".get_assurer_reason($_SESSION['profile']['id'])."</p>";
showfooter(); showfooter();
exit; exit;
} }
}
if($oldid == 6 && intval($_SESSION['_config']['notarise']['id']) <= 0) if($oldid == 6 && intval($_SESSION['_config']['notarise']['id']) <= 0)
{ {
@ -295,6 +297,8 @@
$query .= ",\n`method`='Trusted Third Parties'"; $query .= ",\n`method`='Trusted Third Parties'";
} }
mysql_query($query); mysql_query($query);
fix_assurer_flag($_SESSION['_config']['notarise']['id']);
if($_SESSION['profile']['points'] < 150) if($_SESSION['profile']['points'] < 150)
{ {
$addpoints = 0; $addpoints = 0;
@ -310,6 +314,7 @@
`method`='Administrative Increase', `method`='Administrative Increase',
`when`=NOW()"; `when`=NOW()";
mysql_query($query); mysql_query($query);
// No need to fix_assurer_flag here, this should only happen for assurers...
$_SESSION['profile']['points'] += $addpoints; $_SESSION['profile']['points'] += $addpoints;
} }