--- 1987686-dblog_event-controller-9.patch 2013-06-22 12:10:24.000000000 +0100 +++ 1987686-dblog_event-controller-11.patch 2013-06-25 22:21:04.000000000 +0100 @@ -87,25 +87,23 @@ index cf744b0..5a0671a 100644 * * @return array diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module -index 202cfcf..c78a4af 100644 +index 202cfcf..608429a 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module -@@ -61,13 +61,6 @@ function dblog_menu() { - 'access arguments' => array('access site reports'), - 'file' => 'dblog.admin.inc', +@@ -63,10 +63,7 @@ function dblog_menu() { ); -- $items['admin/reports/event/%'] = array( -- 'title' => 'Details', + $items['admin/reports/event/%'] = array( + 'title' => 'Details', - 'page callback' => 'dblog_event', - 'page arguments' => array(3), - 'access arguments' => array('access site reports'), - 'file' => 'dblog.admin.inc', -- ); ++ 'route_name' => 'dblog_event', + ); if (module_exists('search')) { - $items['admin/reports/search'] = array( diff --git a/core/modules/dblog/dblog.routing.yml b/core/modules/dblog/dblog.routing.yml -index 310d798..6d0c35b 100644 +index 310d798..c40b907 100644 --- a/core/modules/dblog/dblog.routing.yml +++ b/core/modules/dblog/dblog.routing.yml @@ -4,3 +4,10 @@ dblog_overview: @@ -116,7 +114,7 @@ index 310d798..6d0c35b 100644 +dblog_event: + pattern: 'admin/reports/event/{eventId}' + defaults: -+ _content: '\Drupal\dblog\Controller\DBLogController::eventDetails' ++ _content: '\Drupal\dblog\Controller\DbLogController::eventDetails' + requirements: + _permission: 'access site reports' diff --git a/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php b/core/modules/dblog/lib/Drupal/dblog/Controller/DbLogController.php @@ -199,3 +197,25 @@ index b597c89..36885bb 100644 * Builds a query for database log administration filters based on session. * * @return array +diff --git a/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php b/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php +index e619fff..29276fc 100644 +--- a/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php ++++ b/core/modules/dblog/lib/Drupal/dblog/Tests/DbLogTest.php +@@ -64,6 +64,7 @@ function setUp() { + function testDbLog() { + // Login the admin user. + $this->drupalLogin($this->big_user); ++ $this->generateLogEntries(1); + + $row_limit = 100; + $this->verifyRowLimit($row_limit); +@@ -187,7 +188,8 @@ private function verifyReports($response = 200) { + } + + // View the database log event page. +- $this->drupalGet('admin/reports/event/1'); ++ $wid = db_query('SELECT MIN(wid) FROM {watchdog}')->fetchField(); ++ $this->drupalGet('admin/reports/event/' . $wid); + $this->assertResponse($response); + if ($response == 200) { + $this->assertText(t('Details'), 'DBLog event node was displayed');