diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-02-18 17:45:32 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-02-18 17:45:32 +0000 |
commit | b4c0e8eee487c13ce90129f1673964d7d6423d19 (patch) | |
tree | 87dfc190159efed7ff27520597309e9c73df9ab8 /modules/forum/forum.module | |
parent | 60688d68db848a94eddb4d6b3a2f6a58742b8523 (diff) | |
download | brdo-b4c0e8eee487c13ce90129f1673964d7d6423d19.tar.gz brdo-b4c0e8eee487c13ce90129f1673964d7d6423d19.tar.bz2 |
- Patch #221192 by damz: wrong new comment link in forum listings.
Diffstat (limited to 'modules/forum/forum.module')
-rw-r--r-- | modules/forum/forum.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module index d315e99b1..a58c62f33 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -573,7 +573,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) { $term = taxonomy_get_term($tid); - $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d"); + $sql = db_rewrite_sql("SELECT n.nid, r.tid, n.title, n.type, n.sticky, u.name, u.uid, n.created AS timestamp, n.comment AS comment_mode, l.last_comment_timestamp, IF(l.last_comment_uid != 0, cu.name, l.last_comment_name) AS last_comment_name, l.last_comment_uid, l.comment_count AS num_comments, f.tid AS forum_tid FROM {node_comment_statistics} l INNER JOIN {node} n ON n.nid = l.nid INNER JOIN {users} cu ON l.last_comment_uid = cu.uid INNER JOIN {term_node} r ON n.vid = r.vid INNER JOIN {users} u ON n.uid = u.uid INNER JOIN {forum} f ON n.vid = f.vid WHERE n.status = 1 AND r.tid = %d"); $sql .= tablesort_sql($forum_topic_list_header, 'n.sticky DESC,'); $sql .= ', n.created DESC'; // Always add a secondary sort order so that the news forum topics are on top. |