Commit 27a48b6e authored by Johan Cwiklinski's avatar Johan Cwiklinski

Fix database checks display on upgrade screen

parent ab488b11
...@@ -2241,26 +2241,28 @@ class Config extends CommonDBTM { ...@@ -2241,26 +2241,28 @@ class Config extends CommonDBTM {
$db_ver = $result[$version]; $db_ver = $result[$version];
$ok_message = sprintf(__s('Database version seems correct (%s) - Perfect!'), $version); $ok_message = sprintf(__s('Database version seems correct (%s) - Perfect!'), $version);
$ko_message = sprintf(__('Your database engine version seems too old: %s.'), $version); $ko_message = sprintf(__s('Your database engine version seems too old: %s.'), $version);
if (!$db_ver) { if (!$db_ver) {
$error = 2; $error = 2;
} }
$message = $error > 0 ? $ko_message : $ok_message; $message = $error > 0 ? $ko_message : $ok_message;
$html = '<tr class="tab_bg_1">'; $img = "<img src='".$CFG_GLPI['root_doc']."/pics/";
$html .= "<td"; $img .= ($error > 0 ? "ko_min" : "ok_min") . ".png' alt='$message' title='$message'/>";
if ($error > 0) {
$html .= " class='red'";
}
$html .= "><img src='".$CFG_GLPI['root_doc']."/pics/";
$html .= ($error > 0 ? "ko_min" : "ok_min") . ".png' alt='$message'/>";
$html .= "$message</td>";
$html .= '</tr>';
if ($fordebug) { if ($fordebug) {
echo $message . "\n"; echo $img . $message . "\n";
} else { } else {
//$html = '<tr class="tab_bg_1">';
$html = "<td";
if ($error > 0) {
$html .= " class='red'";
}
$html .= ">";
$html .= $img;
$html .= '</td>';
//$html .= '</tr>';
echo $html; echo $html;
} }
return $error; return $error;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment