summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-01 00:19:18 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-12-01 00:19:18 +0000
commit5baaa76b9af4f2a864ca82b48d314ad6ff83c2f4 (patch)
tree621ace3d846ccf69a4dc06f3de2fa9746f93116a /modules/comment/comment.module
parent9ada5dec79b8f42e47a7245a91b669e240c6f6c9 (diff)
downloadbrdo-5baaa76b9af4f2a864ca82b48d314ad6ff83c2f4.tar.gz
brdo-5baaa76b9af4f2a864ca82b48d314ad6ff83c2f4.tar.bz2
#886752 by jhodgdon: Fixed SQL error on PostgreSQL in comment.module
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 2a83aced0..4bb8db7f3 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -831,7 +831,8 @@ function comment_get_thread($node, $mode, $comments_per_page) {
// See comment above. Analysis reveals that this doesn't cost too
// much. It scales much much better than having the whole comment
// structure.
- $query->orderBy('SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))', 'ASC');
+ $query->addExpression('SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))', 'torder');
+ $query->orderBy('torder', 'ASC');
}
$query->setCountQuery($count_query);