Corrections following Olivier's comments
This commit is contained in:
parent
b739683d96
commit
5dead9e9e4
@ -138,15 +138,18 @@ $warnings = 0;
|
||||
foreach ($messages as $message) {
|
||||
if ($message->type == 'danger') {
|
||||
$errors++;
|
||||
} else if ($message->type == 'warning')
|
||||
} else if ($message->type == 'warning') {
|
||||
$warnings++;
|
||||
}
|
||||
}
|
||||
$readyPercentage = round((count($messages)-$errors)*100/count($messages));
|
||||
$readyClass = 'success';
|
||||
|
||||
if ($errors > 0) {
|
||||
$readyClass = 'danger';
|
||||
} else if ($warnings > 0) {
|
||||
$readyClass = 'warning';
|
||||
} else {
|
||||
$readyClass = 'success';
|
||||
}
|
||||
|
||||
usort($messages, 'compareCheckMessage');
|
||||
|
Loading…
Reference in New Issue
Block a user