Commit 883e5631 authored by Steven Wittens's avatar Steven Wittens
Browse files

Pretty up the status report

parent dd4f143d
......@@ -4,6 +4,7 @@
define('SCHEMA_UNINSTALLED', -1);
define('SCHEMA_INSTALLED', 0);
define('REQUIREMENT_INFO', -1);
define('REQUIREMENT_OK', 0);
define('REQUIREMENT_WARNING', 1);
define('REQUIREMENT_ERROR', 2);
......
......@@ -58,3 +58,6 @@ table.system-status-report tr.error th {
table.system-status-report tr.warning th {
background-image: url('../../misc/watchdog-warning.png');
}
table.system-status-report tr.ok th {
background-image: url('../../misc/watchdog-ok.png');
}
......@@ -51,9 +51,6 @@ div.warning, tr.warning {
div.ok, tr.ok {
background: #dfd;
}
.ok {
color: green;
}
.item-list .icon {
color: #555;
float: right;
......
......@@ -19,18 +19,19 @@ function system_requirements($phase) {
$requirements['drupal'] = array(
'title' => $t('Drupal'),
'value' => VERSION,
'severity' => REQUIREMENT_INFO
);
}
// Test web server
$software = $_SERVER['SERVER_SOFTWARE'];
$requirements['webserver'] = array(
'title' => $t('Web server'),
'value' => $software
);
// Use server info string, if present.
if (isset($_SERVER['SERVER_SOFTWARE'])) {
$requirements['webserver']['value'] = $_SERVER['SERVER_SOFTWARE'];
list($server, $version) = split('[ /]', $_SERVER['SERVER_SOFTWARE']);
if ($software && preg_match('![0-9]!', $software)) {
list($server, $version) = split('[ /]', $software);
switch ($server) {
case 'Apache':
if (version_compare($version, DRUPAL_MINIMUM_APACHE) < 0) {
......@@ -46,8 +47,8 @@ function system_requirements($phase) {
}
}
else {
$requirements['webserver']['value'] = $t('Unknown');
$requirements['webserver']['description'] = $t('Unable to determine your web server type. Drupal might not work properly.');
$requirements['webserver']['value'] = $software ? $software : $t('Unknown');
$requirements['webserver']['description'] = $t('Unable to determine your web server type and version. Drupal might not work properly.');
$requirements['webserver']['severity'] = REQUIREMENT_WARNING;
}
......
......@@ -46,7 +46,7 @@ function system_help($section) {
return t('<p>Modules are plugins for Drupal that extend its core functionality. Here you can select which modules are enabled. Click on the name of the module in the navigation menu for their individual configuration pages. Once a module is enabled, new <a href="@permissions">permissions</a> might be made available. Modules can automatically be temporarily disabled to reduce server load when your site becomes extremely busy by enabling the throttle.module and checking throttle. The auto-throttle functionality must be enabled on the <a href="@throttle">throttle configuration page</a> after having enabled the throttle module.</p>
<p>It is important that <a href="@update-php">update.php</a> is run every time a module is updated to a newer version.</p>', array('@permissions' => url('admin/user/access'), '@throttle' => url('admin/settings/throttle'), '@update-php' => $base_url .'/update.php'));
case 'admin/logs/status':
return t('<p>Here you can find a short overview of your Drupal site\'s parameters as well as any problems detected with your installation. It is useful for example to copy/paste this information when you need support.</p>');
return t('<p>Here you can find a short overview of your Drupal site\'s parameters as well as any problems detected with your installation. It is useful to copy/paste this information when you need support.</p>');
}
}
......@@ -1427,6 +1427,7 @@ function theme_status_report(&$requirements) {
$class = $i % 2 == 0 ? 'even' : 'odd';
$classes = array(
REQUIREMENT_INFO => 'info',
REQUIREMENT_OK => 'ok',
REQUIREMENT_WARNING => 'warning',
REQUIREMENT_ERROR => '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