Corrections following Olivier's comments

This commit is contained in:
Antonin 2016-05-04 11:12:59 +02:00
parent b739683d96
commit 5dead9e9e4

View File

@ -138,15 +138,18 @@ $warnings = 0;
foreach ($messages as $message) { foreach ($messages as $message) {
if ($message->type == 'danger') { if ($message->type == 'danger') {
$errors++; $errors++;
} else if ($message->type == 'warning') } else if ($message->type == 'warning') {
$warnings++; $warnings++;
}
} }
$readyPercentage = round((count($messages)-$errors)*100/count($messages)); $readyPercentage = round((count($messages)-$errors)*100/count($messages));
$readyClass = 'success';
if ($errors > 0) { if ($errors > 0) {
$readyClass = 'danger'; $readyClass = 'danger';
} else if ($warnings > 0) { } else if ($warnings > 0) {
$readyClass = 'warning'; $readyClass = 'warning';
} else {
$readyClass = 'success';
} }
usort($messages, 'compareCheckMessage'); usort($messages, 'compareCheckMessage');
@ -157,7 +160,7 @@ usort($messages, 'compareCheckMessage');
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title><?=__('Check', 'Installation checking') ?></title> <title><?=__('Check', 'Installation checking') ?></title>
<link rel="stylesheet" href="../css/bootstrap.min.css"> <link rel="stylesheet" href="../css/bootstrap.min.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">