diff options
author | Dries Buytaert <dries@buytaert.net> | 2006-02-04 09:56:04 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2006-02-04 09:56:04 +0000 |
commit | 87f5947e5166b8f7d4e1f46c27340166c312de0a (patch) | |
tree | 79a193c237485b7c5e53e1cbe5f92d70a551f29b /modules/forum | |
parent | 91e152b8b8d0f1a2497c95bfa3bbb3483adcb4ea (diff) | |
download | brdo-87f5947e5166b8f7d4e1f46c27340166c312de0a.tar.gz brdo-87f5947e5166b8f7d4e1f46c27340166c312de0a.tar.bz2 |
- Patch #47868 by wtanaka: performance improvement: active topics block selects an unused column.
Diffstat (limited to 'modules/forum')
-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 c1b08654d..99c17849d 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -371,7 +371,7 @@ function forum_block($op = 'list', $delta = 0, $edit = array()) { switch ($delta) { case 0: $title = t('Active forum topics'); - $sql = db_rewrite_sql("SELECT n.nid, n.title, l.last_comment_timestamp, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND n.type = 'forum' ORDER BY l.last_comment_timestamp DESC"); + $sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND n.type = 'forum' ORDER BY l.last_comment_timestamp DESC"); $result = db_query_range($sql, 0, variable_get('forum_block_num_0', '5')); if (db_num_rows($result)) { $content = node_title_list($result); |