diff -u b/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc --- b/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -83,7 +83,8 @@ } /** - * Page callback: Displays most frequent unique messages of a given event type. + * Page callback: Displays the most frequent unique messages of a given event + * type. * * Path: admin/reports/search * @@ -198,7 +199,7 @@ } /** - * Builds query for dblog administration filters based on session. + * Builds a query for dblog administration filters based on session. * * @return array * An associative array with keys 'where' and 'args'. @@ -231,10 +232,10 @@ } /** - * Creates list dblog administration filters that can be applied. + * Creates a list of dblog administration filters that can be applied. * * @return array - * Two dimension array with 'type' and 'severity' top-level keys, each of + * Two-dimensional array with 'type' and 'severity' top-level keys, each of * which is an array with the following keys: * - title: Title of the filter. * - where: The filter condition. @@ -247,6 +248,7 @@ foreach (_dblog_get_message_types() as $type) { $types[$type] = t($type); } + if (!empty($types)) { $filters['type'] = array( 'title' => t('Type'), @@ -260,11 +262,12 @@ 'where' => 'w.severity = ?', 'options' => watchdog_severity_levels(), ); + return $filters; } /** - * Returns a HTML-formatted string for dblog event. + * Returns an HTML string for a dblog event. * * @param array $variables * An associative array containing: @@ -272,7 +275,7 @@ * - link: (optional) Format message as link, event->wid is required. * * @return string - * A HTML-formatted string. + * An HTML string. * * @ingroup themeable */ @@ -403,7 +406,7 @@ } /** - * Submission callback for dblog_clear_log_form(). + * Submission handler for dblog_clear_log_form(). * * @see dblog_clear_log_form() */ diff -u b/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module --- b/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -6,8 +6,8 @@ * @file * System monitoring and logging for administrators. * - * The dblog module monitors your site and keeps a list of recorded events - * containing usage and performance data, errors, warnings, and similar + * The Database logging module monitors your site and keeps a list of recorded + * events containing usage and performance data, errors, warnings, and similar * operational information. * * @see watchdog() diff -u b/core/modules/dblog/dblog.test b/core/modules/dblog/dblog.test --- b/core/modules/dblog/dblog.test +++ b/core/modules/dblog/dblog.test @@ -5,8 +5,9 @@ * Tests for dblog.module. */ -// @todo: Is a docblock required for each test class? - +/** + * Tests the Dblog module functionality. + */ class DBLogTestCase extends DrupalWebTestCase { protected $profile = 'standard';