When content is updated, I would expect it to become top of the list?
Only when I add a comment like "I updated this node" it comes on top.
Maybe that's how it supposed to be, but I find this odd.
When content is updated, I would expect it to become top of the list?
Only when I add a comment like "I updated this node" it comes on top.
Maybe that's how it supposed to be, but I find this odd.
Comments
Comment #1
friedchuckles commentedThis can be easily fixed by changing the "last_post" in the sql query.
Change:
l.last_comment_timestamp AS last_post
To:
GREATEST(n.changed, l.last_comment_timestamp) AS last_post
Here's the complete query from version 5.x:
$sql = 'SELECT DISTINCT(n.nid), n.title, n.type, n.changed, n.uid, u.name, GREATEST(n.changed, l.last_comment_timestamp) as last_post, l.comment_count ' . $score_column . ' FROM {node} n INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid ' . $nv_join . 'LEFT JOIN {term_node} t ON t.nid = n.nid LEFT JOIN {comments} c ON n.nid = c.nid WHERE n.status = 1 ' . $sql_where . ' GROUP BY n.nid ';
Comment #2
ednique commentedSupurb!
dead easy and works great!
Comment #3
kbahey commentedFixed.
Comment #4
(not verified) commented