summaryrefslogtreecommitdiff
path: root/modules/forum.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-02-01 14:19:44 +0000
committerDries Buytaert <dries@buytaert.net>2006-02-01 14:19:44 +0000
commit31293d5a2ee046d4c6204bbfd53b7482c6bac922 (patch)
tree501eb339572c6d296f17883ece53f3d599e4d8c8 /modules/forum.module
parent71955d8c8a6d666ea40aabb8d580343f61ad8789 (diff)
downloadbrdo-31293d5a2ee046d4c6204bbfd53b7482c6bac922.tar.gz
brdo-31293d5a2ee046d4c6204bbfd53b7482c6bac922.tar.bz2
- Patch #46864 by stmind: fixed problem with node-level permissions and forums.
Diffstat (limited to 'modules/forum.module')
-rw-r--r--modules/forum.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/forum.module b/modules/forum.module
index c5cb96979..c1b08654d 100644
--- a/modules/forum.module
+++ b/modules/forum.module
@@ -737,7 +737,7 @@ function forum_get_topics($tid, $sortby, $forum_per_page) {
$term = taxonomy_get_term($tid);
- $sql = db_rewrite_sql("SELECT n.nid, f.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 FROM {node} n, {node_comment_statistics} l, {users} cu, {term_node} r, {users} u, {forum} f WHERE n.status = 1 AND l.last_comment_uid = cu.uid AND n.nid = l.nid AND n.nid = r.nid AND r.tid = %d AND n.uid = u.uid AND n.vid = f.vid");
+ $sql = db_rewrite_sql("SELECT n.nid, f.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 FROM {node_comment_statistics} l, {users} cu, {term_node} r, {users} u, {forum} f, {node} n WHERE n.status = 1 AND l.last_comment_uid = cu.uid AND n.nid = l.nid AND n.nid = r.nid AND r.tid = %d AND n.uid = u.uid AND n.vid = f.vid");
$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.