Commit 3fb070f4 authored by Dries's avatar Dries

- Patch #8952 by Morbus: watchdog module beautifications.

  * slightly reorders the functions in anticipation of http://drupal.org/node/view/9010.
  * reorders help definitions to match the alphabetical nature of the menu items.
  * tweaked visual appearance of menu code (whitespace, etc.)
  * minor tweaks to "warning" help to match style of others.
parent cca82f8e
......@@ -22,53 +22,53 @@ function watchdog_help($section = 'admin/help#watchdog') {
return t('<p>The watchdog module monitors your web site, capturing system events in a log to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to <a href="%watchdog">check the watchdog report</a> on a regular basis as it is often the only way to tell what is going on.</p>', array('%watchdog' => url('admin/logs')));
case 'admin/logs':
return t('The watchdog module monitors your web site, capturing system events in a log to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.');
case 'admin/logs/user':
return t('Watchdog events that have to do with users and their accounts.');
case 'admin/logs/regular':
return t('Watchdog events that are "normal" and have no other classification.');
case 'admin/logs/error':
return t('Watchdog events about PHP and database errors.');
case 'admin/logs/httpd':
return t('Watchdog events that are from the web server, like 404s, etc.');
case 'admin/logs/special':
return t('Watchdog events about adding, changing, and moderating nodes and comments.');
case 'admin/logs/regular':
return t('Watchdog events that are "normal" and have no other classification.');
case 'admin/logs/search':
return t('Watchdog events showing what users have searched for.');
case 'admin/logs/error':
return t('Watchdog events about PHP and database errors.');
case 'admin/logs/special':
return t('Watchdog events about adding, changing, and moderating nodes and comments.');
case 'admin/logs/user':
return t('Watchdog events that have to do with users and their accounts.');
case 'admin/logs/warning':
return t('Watchdog warning events. These events don\'t stop Drupal from running, but are things you should know.');
return t('Watchdog events that don\'t stop normal operation, but are things you should know.');
case 'admin/modules#description':
return t('Logs and records system events.');
}
}
/**
* Implementation of hook_perm().
*/
function watchdog_perm() {
return array('administer watchdog');
}
/**
* Implementation of hook_menu().
*/
function watchdog_menu() {
$items = array();
$items[] = array('path' => 'admin/logs', 'title' => t('logs'),
'callback' => 'watchdog_overview',
'access' => user_access('administer watchdog'));
'callback' => 'watchdog_overview', 'access' => user_access('administer watchdog'));
$items[] = array('path' => 'admin/logs/view', 'title' => t('view details'),
'callback' => 'watchdog_view',
'access' => user_access('administer watchdog'),
'callback' => 'watchdog_view', 'access' => user_access('administer watchdog'),
'type' => MENU_CALLBACK);
if (arg(1) == 'logs') {
foreach (_watchdog_get_message_types() as $type) {
$items[] = array('path' => 'admin/logs/'. $type, 'title' => t($type),
'type' => MENU_DYNAMIC_ITEM);
$items[] = array('path' => 'admin/logs/'. $type, 'title' => t($type), 'type' => MENU_DYNAMIC_ITEM);
}
}
return $items;
}
/**
* Implementation of hook_perm().
*/
function watchdog_perm() {
return array('administer watchdog');
}
/**
* Implementation of hook_cron().
*
......
......@@ -22,53 +22,53 @@ function watchdog_help($section = 'admin/help#watchdog') {
return t('<p>The watchdog module monitors your web site, capturing system events in a log to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to <a href="%watchdog">check the watchdog report</a> on a regular basis as it is often the only way to tell what is going on.</p>', array('%watchdog' => url('admin/logs')));
case 'admin/logs':
return t('The watchdog module monitors your web site, capturing system events in a log to be reviewed by an authorized individual at a later time. The watchdog log is simply a list of recorded events containing usage data, performance data, errors, warnings and operational information. It is vital to check the watchdog report on a regular basis as it is often the only way to tell what is going on.');
case 'admin/logs/user':
return t('Watchdog events that have to do with users and their accounts.');
case 'admin/logs/regular':
return t('Watchdog events that are "normal" and have no other classification.');
case 'admin/logs/error':
return t('Watchdog events about PHP and database errors.');
case 'admin/logs/httpd':
return t('Watchdog events that are from the web server, like 404s, etc.');
case 'admin/logs/special':
return t('Watchdog events about adding, changing, and moderating nodes and comments.');
case 'admin/logs/regular':
return t('Watchdog events that are "normal" and have no other classification.');
case 'admin/logs/search':
return t('Watchdog events showing what users have searched for.');
case 'admin/logs/error':
return t('Watchdog events about PHP and database errors.');
case 'admin/logs/special':
return t('Watchdog events about adding, changing, and moderating nodes and comments.');
case 'admin/logs/user':
return t('Watchdog events that have to do with users and their accounts.');
case 'admin/logs/warning':
return t('Watchdog warning events. These events don\'t stop Drupal from running, but are things you should know.');
return t('Watchdog events that don\'t stop normal operation, but are things you should know.');
case 'admin/modules#description':
return t('Logs and records system events.');
}
}
/**
* Implementation of hook_perm().
*/
function watchdog_perm() {
return array('administer watchdog');
}
/**
* Implementation of hook_menu().
*/
function watchdog_menu() {
$items = array();
$items[] = array('path' => 'admin/logs', 'title' => t('logs'),
'callback' => 'watchdog_overview',
'access' => user_access('administer watchdog'));
'callback' => 'watchdog_overview', 'access' => user_access('administer watchdog'));
$items[] = array('path' => 'admin/logs/view', 'title' => t('view details'),
'callback' => 'watchdog_view',
'access' => user_access('administer watchdog'),
'callback' => 'watchdog_view', 'access' => user_access('administer watchdog'),
'type' => MENU_CALLBACK);
if (arg(1) == 'logs') {
foreach (_watchdog_get_message_types() as $type) {
$items[] = array('path' => 'admin/logs/'. $type, 'title' => t($type),
'type' => MENU_DYNAMIC_ITEM);
$items[] = array('path' => 'admin/logs/'. $type, 'title' => t($type), 'type' => MENU_DYNAMIC_ITEM);
}
}
return $items;
}
/**
* Implementation of hook_perm().
*/
function watchdog_perm() {
return array('administer watchdog');
}
/**
* Implementation of hook_cron().
*
......
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