diff --git a/core/modules/dblog/dblog.admin.inc b/core/modules/dblog/dblog.admin.inc index fd056c2..22c4efa 100644 --- a/core/modules/dblog/dblog.admin.inc +++ b/core/modules/dblog/dblog.admin.inc @@ -19,16 +19,7 @@ function dblog_overview() { $filter = dblog_build_filter_query(); $rows = array(); - $classes = array( - WATCHDOG_DEBUG => 'dblog-debug', - WATCHDOG_INFO => 'dblog-info', - WATCHDOG_NOTICE => 'dblog-notice', - WATCHDOG_WARNING => 'dblog-warning', - WATCHDOG_ERROR => 'dblog-error', - WATCHDOG_CRITICAL => 'dblog-critical', - WATCHDOG_ALERT => 'dblog-alert', - WATCHDOG_EMERGENCY => 'dblog-emergency', - ); + $classes = dblog_views_severity_options_map(); $build['dblog_filter_form'] = drupal_get_form('dblog_filter_form'); $build['dblog_clear_log_form'] = drupal_get_form('dblog_clear_log_form'); diff --git a/core/modules/dblog/dblog.module b/core/modules/dblog/dblog.module index 5318a34..b86bc2a 100644 --- a/core/modules/dblog/dblog.module +++ b/core/modules/dblog/dblog.module @@ -203,7 +203,7 @@ function dblog_theme() { * @return array * An assosiative array with the severity constant as key and ... as value. */ -function dblog_views_severity_options_callback() { +function dblog_views_severity_options_map() { return array( WATCHDOG_DEBUG => 'dblog-debug', WATCHDOG_INFO => 'dblog-info', diff --git a/core/modules/dblog/dblog.views.inc b/core/modules/dblog/dblog.views.inc index b983e53..b740ec0 100644 --- a/core/modules/dblog/dblog.views.inc +++ b/core/modules/dblog/dblog.views.inc @@ -105,6 +105,7 @@ function dblog_views_data() { 'help' => t('The variables of the log entry in a serialized format.'), 'field' => array( 'id' => 'serialized', + 'click sortable' => FALSE, ), 'argument' => array( 'id' => 'string', @@ -122,11 +123,11 @@ function dblog_views_data() { 'help' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug).'), 'field' => array( 'id' => 'machine_name', - 'options callback' => 'dblog_views_severity_options_callback', + 'options callback' => 'dblog_views_severity_options_map', ), 'filter' => array( 'id' => 'in_operator', - 'options callback' => 'dblog_views_severity_options_callback', + 'options callback' => 'dblog_views_severity_options_map', ), 'sort' => array( 'id' => 'standard', @@ -134,11 +135,11 @@ function dblog_views_data() { ); $data['watchdog']['link'] = array( - 'title' => t('Link'), - 'help' => t('Link to view the result of the event.'), + 'title' => t('Operations'), + 'help' => t('Operation links for the event.'), 'field' => array( - 'id' => 'standard', - 'click sortable' => TRUE, + 'id' => 'dblog_operations', + 'click sortable' => FALSE, ), 'argument' => array( 'id' => 'string', 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 5743e68..4d6ee3c 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 @@ -68,7 +68,7 @@ public function render($values) { if ($this->options['replace_variables']) { $variables = unserialize($this->get_value($values, 'variables')); - return $this->sanitizeValue(format_string($value, (array) $variables)); + return $this->sanitizeValue(format_string($value, (array) $variables), 'xss_admin'); } else { return $this->sanitizeValue($value);