diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-04 01:52:15 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-04 01:52:15 +0000 |
commit | af8882e9736356820db8e6a59f68a362cca313b2 (patch) | |
tree | 9c5cd7adfd5689103c1b44475899392da0e00e0f | |
parent | 74e5b8aba2c62ad9eece3315dcf5b325a73cf329 (diff) | |
download | brdo-af8882e9736356820db8e6a59f68a362cca313b2.tar.gz brdo-af8882e9736356820db8e6a59f68a362cca313b2.tar.bz2 |
#978050 by swentel: Fixed Clearing the log with a filter throws notice and a PDOException
-rw-r--r-- | modules/dblog/dblog.admin.inc | 1 | ||||
-rw-r--r-- | modules/dblog/dblog.test | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/modules/dblog/dblog.admin.inc b/modules/dblog/dblog.admin.inc index 26b0b50c1..53ae7a0ab 100644 --- a/modules/dblog/dblog.admin.inc +++ b/modules/dblog/dblog.admin.inc @@ -376,6 +376,7 @@ function dblog_clear_log_form($form) { * Submit callback: clear database with log messages. */ function dblog_clear_log_submit() { + $_SESSION['dblog_overview_filter'] = array(); db_delete('watchdog')->execute(); drupal_set_message(t('Database log cleared.')); } diff --git a/modules/dblog/dblog.test b/modules/dblog/dblog.test index ab4de7739..19cf0f448 100644 --- a/modules/dblog/dblog.test +++ b/modules/dblog/dblog.test @@ -467,6 +467,10 @@ class DBLogTestCase extends DrupalWebTestCase { $count = $this->getTypeCount($types); $this->assertEqual(array_sum($count), $type['count'], 'Count matched'); } + + // Clear all logs and make sure the confirmation message is found. + $this->drupalPost('admin/reports/dblog', array(), t('Clear log messages')); + $this->assertText(t('Database log cleared.'), t('Confirmation message found')); } /** |