diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-01 00:19:18 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-12-01 00:19:18 +0000 |
commit | 5baaa76b9af4f2a864ca82b48d314ad6ff83c2f4 (patch) | |
tree | 621ace3d846ccf69a4dc06f3de2fa9746f93116a /modules/comment/comment.module | |
parent | 9ada5dec79b8f42e47a7245a91b669e240c6f6c9 (diff) | |
download | brdo-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.module | 3 |
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); |