Posted by gnassar on December 1, 2007 at 8:46pm
2 followers
Jump to:
| Project: | Forward |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
The Most Active sort was broken by the fix for issue http://drupal.org/node/196833. Issue created to fix that.
Comments
#1
The old sort was in a redefined node_comment_statistics Views table block. What that effectively did was left-join node_comment_statistics with forward_statistics (up in the field definition), and use that to get the total. It would seem to me that that with Most Active now in forward_statistics, the join could be implemented within Most Active's handler function itself as the most straightforward way to do it, and since the purpose of the join is really solely for that function, that would seem the most appropriate place for it.
#2
So, in other words, I think we'd be looking at a $query->add_table for the comments table, then add_field (since the $field parameter can be a calculation), then add_orderby.
I don't have the time to write the function up itself right now, but if you'd like to post anything you come up with, I'd be happy to sneak away for a few minutes and take a look at it.
#3