summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-01-31 19:30:13 +0000
committerDries Buytaert <dries@buytaert.net>2005-01-31 19:30:13 +0000
commit7ae04af1e0089a8a11052ec7562037ad8f8785bd (patch)
treebd5d758a4df31b8f83bf9f58d4e552f94df2dd72 /modules/comment/comment.module
parentb176382d23fd340c91da6ba2ec73ead4704e97e0 (diff)
downloadbrdo-7ae04af1e0089a8a11052ec7562037ad8f8785bd.tar.gz
brdo-7ae04af1e0089a8a11052ec7562037ad8f8785bd.tar.bz2
- Patch by Jose A Reyero: fixed probem with db_rewriste_sql() in the comment.module.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 22c51bd15..8ac68ba7c 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -157,7 +157,7 @@ function comment_block($op = 'list', $delta = 0) {
return $blocks;
}
else if ($op == 'view' && user_access('access comments')) {
- $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE status = 0 ORDER BY timestamp DESC', 'c'), 0, 10);
+ $result = db_query_range(db_rewrite_sql('SELECT c.nid, c.* FROM {comments} c WHERE c.status = 0 ORDER BY c.timestamp DESC', 'c'), 0, 10);
$items = array();
while ($comment = db_fetch_object($result)) {
$items[] = l($comment->subject, 'node/'. $comment->nid, NULL, NULL, 'comment-'. $comment->cid) .'<br />'. t('%time ago', array('%time' => format_interval(time() - $comment->timestamp)));