From 1fa90e382dd01c8a0141508c9d45122fed56e757 Mon Sep 17 00:00:00 2001
From: Daniel Wehner <daniel.wehner@erdfisch.de>
Date: Thu, 31 May 2012 21:21:44 +0200
Subject: [PATCH] Issue #1605326 by dawehner: Add comment.language integration.

---
 modules/comment.views.inc | 22 ++++++++++++++++++++++
 modules/locale.views.inc  |  1 -
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/modules/comment.views.inc b/modules/comment.views.inc
index ae685068d9ee..65ef18cabde0 100644
--- a/modules/comment.views.inc
+++ b/modules/comment.views.inc
@@ -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');
   // changed (when comment was last updated)
   $data['comment']['changed'] = array(
diff --git a/modules/locale.views.inc b/modules/locale.views.inc
index e2e7dddd945b..3bff7dbd401e 100644
--- a/modules/locale.views.inc
+++ b/modules/locale.views.inc
@@ -202,7 +202,6 @@ function locale_views_data() {
 function locale_views_data_alter(&$data) {
   // Language field
   $data['node']['language'] = array(
-    'group' => t('Content'),
     'title' => t('Language'),
     'help' => t('The language the content is in.'),
     'field' => array(
-- 
GitLab