? .cvsignore
? views
? views_category.patch
? views_category2.patch
Index: userpoints.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/userpoints/userpoints.info,v
retrieving revision 1.11.4.2
diff -u -p -r1.11.4.2 userpoints.info
--- userpoints.info	8 Dec 2010 16:29:48 -0000	1.11.4.2
+++ userpoints.info	9 Dec 2010 21:57:49 -0000
@@ -6,4 +6,7 @@ core = 7.x
 files[]=userpoints.views.inc
 files[]=userpoints.module
 files[]=tests/userpoints_api.test
+files[]=views/userpoints_views_handler_field_category.inc
+files[]=views/userpoints_views_handler_filter_category.inc
+files[]=views/userpoints_views_handler_argument_category.inc
 configure = admin/config/people/userpoints/settings
Index: userpoints.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/userpoints/userpoints.views.inc,v
retrieving revision 1.2.2.1
diff -u -p -r1.2.2.1 userpoints.views.inc
--- userpoints.views.inc	30 Jul 2010 11:20:22 -0000	1.2.2.1
+++ userpoints.views.inc	9 Dec 2010 21:57:49 -0000
@@ -33,7 +33,7 @@ function userpoints_views_data() {
           'left_field' => 'uid',
           'field' => 'uid',
       ),
-      'term_data' => array(
+      'taxonomy_term_data' => array(
           'left_field' => 'tid',
           'field' => 'tid',
       ),
@@ -68,18 +68,18 @@ function userpoints_views_data() {
 
   // Describe the tid column of the userpoints table.
   $data['userpoints']['tid'] = array(
-      'title' => t('Userpoints Category', userpoints_translation()),
-      'help' => t('The categories (terms) of userpoints used', userpoints_translation()), // The help that appears on the UI,
+      'title' => t('Category'),
+      'help' => t('The categories (terms) of userpoints used'), // The help that appears on the UI,
       'field' => array(
-          'handler' => 'views_handler_field_term_node_tid',
+          'handler' => 'userpoints_views_handler_field_category',
       ),
       'argument' => array(
-          'handler' => 'views_handler_argument_term_node_tid',
+          'handler' => 'userpoints_views_handler_argument_category',
           'numeric' => TRUE,
           'name field' => 'category', // display this field in the summary
       ),
       'filter' => array(
-          'handler' => 'views_handler_filter_term_node_tid',
+          'handler' => 'userpoints_views_handler_filter_category',
       ),
       'sort' => array(
           'handler' => 'views_handler_sort',
@@ -152,7 +152,7 @@ function userpoints_views_data() {
           'left_field' => 'uid',
           'field' => 'uid',
       ),
-      'term_data' => array(
+      'taxonomy_term_data' => array(
           'left_field' => 'tid',
           'field' => 'tid',
       ),
@@ -187,18 +187,18 @@ function userpoints_views_data() {
 
   // Describe the tid column of the userpoints table.
   $data['userpoints_txn']['tid'] = array(
-      'title' => t('Userpoints Category', userpoints_translation()),
-      'help' => t('The categories (terms) of userpoints used for this transaction', userpoints_translation()), // The help that appears on the UI,
+      'title' => t('Category'),
+      'help' => t('The categories (terms) of userpoints used for this transaction'), // The help that appears on the UI,
       'field' => array(
-          'handler' => 'views_handler_field_term_node_tid	',
+          'handler' => 'userpoints_views_handler_field_category',
       ),
       'argument' => array(
-          'handler' => 'views_handler_argument_term_node_tid',
+          'handler' => 'userpoints_views_handler_argument_category',
           'numeric' => TRUE,
           'name field' => 'category', // display this field in the summary
       ),
       'filter' => array(
-          'handler' => 'views_handler_filter_term_node_tid',
+          'handler' => 'userpoints_views_handler_filter_category',
       ),
       'sort' => array(
           'handler' => 'views_handler_sort',
@@ -359,5 +359,22 @@ function userpoints_views_data() {
       ),
   );
 
+  // Reverse join information. This should not be necessary.
+  $data['taxonomy_term_data']['table']['join'] = array(
+    'userpoints' => array(
+      'left_field' => 'tid',
+      'field' => 'tid',
+    ),
+    'userpoints_txn' => array(
+      'left_field' => 'tid',
+      'field' => 'tid',
+    ),
+    'users' => array(
+      'left_field' => 'tid',
+      'left_table' => 'userpoints',
+      'field' => 'tid',
+    )
+  );
+
   return $data;
 }
