#117365: Comment: Last Changed Time wasn't ensuring node_comment_statistics is in...
authorEarl Miles
Fri, 4 May 2007 23:23:47 +0000 (23:23 +0000)
committerEarl Miles
Fri, 4 May 2007 23:23:47 +0000 (23:23 +0000)
CHANGELOG.txt
modules/views_comment.inc

index 46d90c0..9523bd7 100644 (file)
@@ -7,6 +7,7 @@ Views 4.7.x-dev
   Bugs fixed:
     o #140431: Taxonomy select boxes were improperly showing descriptions.
     o #138510: Multi-select for taxonomy had disappeared.
+    o #117365: Comment: Last Changed Time wasn't ensuring node_comment_statistics is in the query.
 
 Views 4.7.x-1.6-beta3
     o Reverting #130196: The original behavior was correct.
index 362f821..632c57d 100644 (file)
@@ -178,6 +178,7 @@ function comment_views_tables() {
 }
 
 function views_query_handler_field_last_changed($field, $fieldinfo, &$query) {
+  $query->ensure_table('node_comment_statistics');
   $query->add_field('GREATEST(node.changed, node_comment_statistics.last_comment_timestamp)', '', $field['tablename'] . '_last_changed');
 }
 
@@ -191,7 +192,6 @@ function views_handler_filter_last_changed($op, $filter, $filterinfo, &$query) {
   $query->add_where("%s %s %s + %d", $field, $filter['operator'], $value, $filter['options']);
 }
 
-
 function views_handler_sort_last_changed($action, &$query, $sortinfo, $sort) {
   $query->ensure_table('node_comment_statistics');
   $query->orderby[] = 'GREATEST(node.changed, node_comment_statistics.last_comment_timestamp) ' . $sort['sortorder'];