From 3fb070f419bd873c40d2df5d00cca3565aeef984 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 3 Jul 2004 14:10:09 +0000 Subject: - 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. --- modules/watchdog.module | 44 ++++++++++++++++++++-------------------- modules/watchdog/watchdog.module | 44 ++++++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 44 deletions(-) (limited to 'modules') diff --git a/modules/watchdog.module b/modules/watchdog.module index 9f88e92c4..f8c0dcc2f 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -22,53 +22,53 @@ function watchdog_help($section = 'admin/help#watchdog') { 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.

', 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(). * diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index 9f88e92c4..f8c0dcc2f 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -22,53 +22,53 @@ function watchdog_help($section = 'admin/help#watchdog') { 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.

', 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(). * -- cgit v1.2.3