diff --git a/core/modules/dblog/dblog.views.inc b/core/modules/dblog/dblog.views.inc index 3822974..b983e53 100644 --- a/core/modules/dblog/dblog.views.inc +++ b/core/modules/dblog/dblog.views.inc @@ -26,7 +26,6 @@ function dblog_views_data() { 'help' => t('Unique watchdog event ID.'), 'field' => array( 'id' => 'numeric', - 'click sortable' => TRUE, ), 'filter' => array( 'id' => 'numeric', @@ -47,7 +46,6 @@ function dblog_views_data() { 'help' => t('The user ID of the user on which the log entry was written..'), 'field' => array( 'id' => 'numeric', - 'click sortable' => TRUE, ), 'filter' => array( 'id' => 'numeric', @@ -72,7 +70,6 @@ function dblog_views_data() { 'help' => t('The of the log entry, for example "user" or "page not found.".'), 'field' => array( 'id' => 'standard', - 'click sortable' => TRUE, ), 'argument' => array( 'id' => 'string', @@ -125,7 +122,6 @@ function dblog_views_data() { 'help' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).'), 'field' => array( 'id' => 'machine_name', - 'click sortable' => TRUE, 'options callback' => 'dblog_views_severity_options_callback', ), 'filter' => array( @@ -160,7 +156,6 @@ function dblog_views_data() { 'help' => t('URL of the origin of the event.'), 'field' => array( 'id' => 'standard', - 'click sortable' => TRUE, ), 'argument' => array( 'id' => 'string', @@ -178,7 +173,6 @@ function dblog_views_data() { 'help' => t('URL of the previous page.'), 'field' => array( 'id' => 'standard', - 'click sortable' => TRUE, ), 'argument' => array( 'id' => 'string', @@ -196,7 +190,6 @@ function dblog_views_data() { 'help' => t('Hostname of the user who triggered the event.'), 'field' => array( 'id' => 'standard', - 'click sortable' => TRUE, ), 'argument' => array( 'id' => 'string', @@ -214,7 +207,6 @@ function dblog_views_data() { 'help' => t('Date when the event occurred.'), 'field' => array( 'id' => 'date', - 'click sortable' => TRUE, ), 'argument' => array( 'id' => 'date', diff --git a/core/modules/dblog/lib/Drupal/dblog/Plugin/views/field/DblogMessage.php b/core/modules/dblog/lib/Drupal/dblog/Plugin/views/field/DblogMessage.php index ecfa406..5743e68 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Plugin/views/field/DblogMessage.php +++ b/core/modules/dblog/lib/Drupal/dblog/Plugin/views/field/DblogMessage.php @@ -18,7 +18,8 @@ * @ingroup views_field_handlers * * @Plugin( - * id = "dblog_message" + * id = "dblog_message", + * module = "dblog" * ) */ class DblogMessage extends FieldPluginBase { @@ -62,12 +63,12 @@ public function buildOptionsForm(&$form, &$form_state) { /** * Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::FieldPluginBase(). */ - function render($values) { + public function render($values) { $value = $this->get_value($values); if ($this->options['replace_variables']) { $variables = unserialize($this->get_value($values, 'variables')); - return format_string($value, (array) $variables); + return $this->sanitizeValue(format_string($value, (array) $variables)); } else { return $this->sanitizeValue($value); diff --git a/core/modules/dblog/lib/Drupal/dblog/Tests/Views/ViewsIntegrationTest.php b/core/modules/dblog/lib/Drupal/dblog/Tests/Views/ViewsIntegrationTest.php index 8e614c1..5f14333 100644 --- a/core/modules/dblog/lib/Drupal/dblog/Tests/Views/ViewsIntegrationTest.php +++ b/core/modules/dblog/lib/Drupal/dblog/Tests/Views/ViewsIntegrationTest.php @@ -27,21 +27,20 @@ class ViewsIntegrationTest extends ViewUnitTestBase { * * @var array */ - public static $modules = array('dblog', 'dblog_test_views', 'views', 'system'); + public static $modules = array('dblog_test_views', 'views'); public static function getInfo() { return array( 'name' => 'Dblog Integration', 'description' => 'Tests the views integration of dblog module.', - 'group' => 'Views Modules' + 'group' => 'Views module integration' ); } protected function setUp() { parent::setUp(); - $this->installSchema('system', 'cache_path'); - $this->installSchema('dblog', 'watchdog'); + $this->enableModules(array('system', 'dblog')); ViewTestData::importTestViews(get_class($this), array('dblog_test_views')); } @@ -63,8 +62,9 @@ public function testIntegration() { } $view = views_get_view('test_dblog'); - $this->executeView($view); + + // @todo Add test assertions. } } diff --git a/core/modules/dblog/tests/modules/dblog_test_views/test_views/views.view.test_dblog.yml b/core/modules/dblog/tests/modules/dblog_test_views/test_views/views.view.test_dblog.yml index 1d5db8f..c826832 100644 --- a/core/modules/dblog/tests/modules/dblog_test_views/test_views/views.view.test_dblog.yml +++ b/core/modules/dblog/tests/modules/dblog_test_views/test_views/views.view.test_dblog.yml @@ -1,9 +1,8 @@ -api_version: '3.0' base_field: wid base_table: watchdog core: 8.x description: '' -disabled: '0' +status: '1' display: default: display_plugin: default @@ -86,5 +85,5 @@ display: path: test-dblog human_name: test_dblog module: views -name: test_dblog +id: test_dblog tag: ''