summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-29 10:46:41 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-29 10:46:41 +0000
commitc574afadae34bbaf21e065eb398ca7ca964aad26 (patch)
tree247d5108a88d0a3cece7a823af1edb209cc78290 /modules/comment/comment.module
parent9ef1d496e969abc51a408ec5b346903497149644 (diff)
downloadbrdo-c574afadae34bbaf21e065eb398ca7ca964aad26.tar.gz
brdo-c574afadae34bbaf21e065eb398ca7ca964aad26.tar.bz2
- Patch #394182 by chx, Berdir: converted search module to the new database abstraction layer. Rest in peace old database layer.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 883f8036a..4d5dcd0e3 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -2408,10 +2408,15 @@ function comment_ranking() {
return array(
'comments' => array(
'title' => t('Number of comments'),
- 'join' => 'LEFT JOIN {node_comment_statistics} node_comment_statistics ON node_comment_statistics.nid = i.sid',
+ 'join' => array(
+ 'type' => 'LEFT',
+ 'table' => 'node_comment_statistics',
+ 'alias' => 'node_comment_statistics',
+ 'on' => 'node_comment_statistics.nid = i.sid',
+ ),
// Inverse law that maps the highest reply count on the site to 1 and 0 to 0.
- 'score' => '2.0 - 2.0 / (1.0 + node_comment_statistics.comment_count * CAST(%f AS DECIMAL))',
- 'arguments' => array(variable_get('node_cron_comments_scale', 0)),
+ 'score' => '2.0 - 2.0 / (1.0 + node_comment_statistics.comment_count * CAST(:scale AS DECIMAL))',
+ 'arguments' => array(':scale' => variable_get('node_cron_comments_scale', 0)),
),
);
}