diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-01-08 19:43:35 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-01-08 19:43:35 +0000 |
commit | 22c3f055e1b4115561dfa4514747d7d8e4475531 (patch) | |
tree | 519d527347b738d8cc91c8bf16c406996e340323 /modules/forum.module | |
parent | 28aa217f901df33f451c988e0e7877fb91ed0b41 (diff) | |
download | brdo-22c3f055e1b4115561dfa4514747d7d8e4475531.tar.gz brdo-22c3f055e1b4115561dfa4514747d7d8e4475531.tar.bz2 |
- Bugfix: fixed the SQL query in _forum_topics_read to avoid counting shadowed
topics in forums. Patch by David.
Diffstat (limited to 'modules/forum.module')
-rw-r--r-- | modules/forum.module | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/forum.module b/modules/forum.module index f1d507e3f..605d8048f 100644 --- a/modules/forum.module +++ b/modules/forum.module @@ -386,7 +386,7 @@ function _forum_num_replies($term) { } function _forum_topics_read($uid) { - $result = db_query("SELECT tid, count(*) AS c FROM history h, term_node r, node n WHERE r.nid = h.nid AND n.nid = h.nid AND n.type = 'forum' AND n.status = 1 AND h.uid = '%d' GROUP BY tid", $uid); + $result = db_query("SELECT tid, count(*) AS c FROM history h, term_node r, node n, forum f WHERE f.nid = r.nid AND r.nid = h.nid AND n.nid = h.nid AND f.shadow = 0 AND n.type = 'forum' AND n.status = 1 AND h.uid = '%d' GROUP BY tid", $uid); while ($obj = db_fetch_object($result)) { $topics_read[$obj->tid] = $obj->c; |