diff options
Diffstat (limited to 'modules/dblog')
-rw-r--r-- | modules/dblog/dblog.admin.inc | 16 | ||||
-rw-r--r-- | modules/dblog/dblog.module | 8 | ||||
-rw-r--r-- | modules/dblog/dblog.test | 2 |
3 files changed, 7 insertions, 19 deletions
diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc index ce0f79de2..764776d8e 100644 --- a/modules/dblog/dblog.admin.inc +++ b/modules/dblog/dblog.admin.inc @@ -7,21 +7,17 @@ */ /** - * dblog module settings form. - * - * @ingroup forms - * @see system_settings_form() + * Implementation of hook_form_FORM_ID_alter(). */ -function dblog_admin_settings() { +function dblog_form_system_logging_settings_alter(&$form, $form_state) { $form['dblog_row_limit'] = array( '#type' => 'select', - '#title' => t('Discard log entries above the following row limit'), - '#default_value' => 1000, + '#title' => t('Database log entries to keep'), + '#default_value' => variable_get('dblog_row_limit', 1000), '#options' => drupal_map_assoc(array(100, 1000, 10000, 100000, 1000000)), - '#description' => t('The maximum number of rows to keep in the database log. Older entries will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status'))) + '#description' => t('The maximum number of entries to keep in the database log. Requires a <a href="@cron">cron maintenance task</a>.', array('@cron' => url('admin/reports/status'))) ); - - return system_settings_form($form, TRUE); + $form['buttons']['#weight'] = 1; } /** diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module index f16f5a4c9..44729e455 100644 --- a/modules/dblog/dblog.module +++ b/modules/dblog/dblog.module @@ -42,14 +42,6 @@ function dblog_theme() { * Implementation of hook_menu(). */ function dblog_menu() { - $items['admin/settings/logging/dblog'] = array( - 'title' => 'Database logging', - 'description' => 'Settings for logging to the Drupal database logs. This is the most common method for small to medium sites on shared hosting. The logs are viewable from the admin pages.', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('dblog_admin_settings'), - 'access arguments' => array('administer site configuration'), - 'type' => MENU_LOCAL_TASK, - ); $items['admin/reports/dblog'] = array( 'title' => 'Recent log entries', 'description' => 'View events that have recently been logged.', diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test index 2e5aadd05..ca6be2f3c 100644 --- a/modules/dblog/dblog.test +++ b/modules/dblog/dblog.test @@ -50,7 +50,7 @@ class DBLogTestCase extends DrupalWebTestCase { // Change the dblog row limit. $edit = array(); $edit['dblog_row_limit'] = $row_limit; - $this->drupalPost('admin/settings/logging/dblog', $edit, t('Save configuration')); + $this->drupalPost('admin/settings/logging', $edit, t('Save configuration')); $this->assertResponse(200); // Check row limit variable. |