Skip to content
Snippets Groups Projects
Commit 1fa90e38 authored by Daniel Wehner's avatar Daniel Wehner Committed by Tim Plunkett
Browse files

Issue #1605326 by dawehner: Add comment.language integration.

parent 7928024c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -168,6 +168,28 @@ function comment_views_data() { ...@@ -168,6 +168,28 @@ function comment_views_data() {
), ),
); );
// Language field
if (module_exists('locale')) {
$data['comment']['language'] = array(
'title' => t('Language'),
'help' => t('The language the comment is in.'),
'field' => array(
'handler' => 'views_handler_field_locale_language',
'click sortable' => TRUE,
),
'filter' => array(
'handler' => 'views_handler_filter_locale_language',
),
'argument' => array(
'handler' => 'views_handler_argument_locale_language',
),
'sort' => array(
'handler' => 'views_handler_sort',
),
);
}
$data['comments']['timestamp']['moved to'] = array('comment', 'changed'); $data['comments']['timestamp']['moved to'] = array('comment', 'changed');
// changed (when comment was last updated) // changed (when comment was last updated)
$data['comment']['changed'] = array( $data['comment']['changed'] = array(
......
...@@ -202,7 +202,6 @@ function locale_views_data() { ...@@ -202,7 +202,6 @@ function locale_views_data() {
function locale_views_data_alter(&$data) { function locale_views_data_alter(&$data) {
// Language field // Language field
$data['node']['language'] = array( $data['node']['language'] = array(
'group' => t('Content'),
'title' => t('Language'), 'title' => t('Language'),
'help' => t('The language the content is in.'), 'help' => t('The language the content is in.'),
'field' => array( 'field' => array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment