Combined fixes for
- https://bugs.cacert.org/view.php?id=413 "Add a web page indicating the certificate request is still pending" - https://bugs.cacert.org/view.php?id=1138 "Implement to log the SE activity" - https://bugs.cacert.org/view.php?id=1221 "Inconsistency in Assurance Management"
This commit is contained in:
parent
14aafe2212
commit
42f16aab95
5 changed files with 60 additions and 58 deletions
|
@ -441,7 +441,7 @@ sub calculateDays($)
|
|||
{
|
||||
if($_[0])
|
||||
{
|
||||
my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' group by `to`");
|
||||
my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' and `deleted`=0 group by `to`");
|
||||
SysLog("Summe: $sum[0]\n") if($debug);
|
||||
|
||||
return ($sum[0]>=50)?730:180;
|
||||
|
|
|
@ -425,7 +425,7 @@ sub calculateDays($)
|
|||
{
|
||||
if($_[0])
|
||||
{
|
||||
my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' group by `to`");
|
||||
my @sum = $dbh->selectrow_array("select sum(`points`) as `total` from `notary` where `to`='".$_[0]."' and `deleted`=0 group by `to`");
|
||||
SysLog("Summe: $sum[0]\n") if($debug);
|
||||
|
||||
return ($sum[0]>=50)?730:180;
|
||||
|
|
|
@ -51,7 +51,8 @@ function fix_assurer_flag($userID = NULL)
|
|||
SELECT SUM(`points`) FROM `notary` AS `n`
|
||||
WHERE `n`.`to` = `u`.`id`
|
||||
AND (`n`.`expire` > now()
|
||||
OR `n`.`expire` IS NULL)
|
||||
OR `n`.`expire` IS NULL)
|
||||
AND `n`.`deleted` = 0
|
||||
) >= 100';
|
||||
|
||||
$query = mysql_query($sql);
|
||||
|
@ -86,6 +87,7 @@ function fix_assurer_flag($userID = NULL)
|
|||
`n`.`expire` > now()
|
||||
OR `n`.`expire` IS NULL
|
||||
)
|
||||
AND `n`.`deleted` = 0
|
||||
) < 100
|
||||
)';
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ function runCommand($command, $input = "", &$output = null, &$errors = true) {
|
|||
$Result |= 5;
|
||||
}
|
||||
|
||||
$query = mysql_query('SELECT SUM(`points`) AS `points` FROM `notary` AS `n` WHERE `n`.`to` = \''.(int)intval($userID).'\' AND `n`.`expire` < now()');
|
||||
$query = mysql_query('SELECT SUM(`points`) AS `points` FROM `notary` AS `n` WHERE `n`.`to` = \''.(int)intval($userID).'\' AND `n`.`expire` < now() and `deleted` = 0');
|
||||
$row = mysql_fetch_assoc($query);
|
||||
if ($row['points'] < 100) {
|
||||
$Result |= 3;
|
||||
|
@ -160,4 +160,3 @@ function runCommand($command, $input = "", &$output = null, &$errors = true) {
|
|||
|
||||
return $Result;
|
||||
}
|
||||
|
|
@ -116,7 +116,8 @@ function getDataFromLive() {
|
|||
|
||||
$stats['assurances_made'] = number_format(tc(
|
||||
"select count(*) as `count` from `notary`
|
||||
where `method` = '' or `method` = 'Face to Face Meeting'"));
|
||||
where (`method` = '' or `method` = 'Face to Face Meeting')
|
||||
and `deleted` = 0"));
|
||||
|
||||
$stats['users_1to49'] = number_format(tc(
|
||||
"select count(*) as `count` from (
|
||||
|
|
Loading…
Reference in a new issue