diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-01-31 19:30:13 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-01-31 19:30:13 +0000 |
commit | 7ae04af1e0089a8a11052ec7562037ad8f8785bd (patch) | |
tree | bd5d758a4df31b8f83bf9f58d4e552f94df2dd72 | |
parent | b176382d23fd340c91da6ba2ec73ead4704e97e0 (diff) | |
download | brdo-7ae04af1e0089a8a11052ec7562037ad8f8785bd.tar.gz brdo-7ae04af1e0089a8a11052ec7562037ad8f8785bd.tar.bz2 |
- Patch by Jose A Reyero: fixed probem with db_rewriste_sql() in the comment.module.
-rw-r--r-- | modules/comment.module | 2 | ||||
-rw-r--r-- | modules/comment/comment.module | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module index 22c51bd15..8ac68ba7c 100644 --- a/modules/comment.module +++ b/modules/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))); 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))); |