diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-02-26 22:19:24 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-02-26 22:19:24 +0000 |
commit | dadf09d8c82a3a0849339e2154b83cf9ad96a1a6 (patch) | |
tree | 80c14547a79dfdf0a3c8c8da0e8868943f654155 /modules | |
parent | 8ae2520965d977d7ee7ff9665f9227935e7bdbd7 (diff) | |
download | brdo-dadf09d8c82a3a0849339e2154b83cf9ad96a1a6.tar.gz brdo-dadf09d8c82a3a0849339e2154b83cf9ad96a1a6.tar.bz2 |
- Fixed bug in comment_num_replies() causing problems in the tracker module
(and potentially in the forum module).
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment.module | 4 | ||||
-rw-r--r-- | modules/comment/comment.module | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment.module b/modules/comment.module index 7340ffbb2..2c0de7923 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1332,10 +1332,10 @@ function comment_num_replies($id) { if (empty($cache[$nid])) { $result = db_query("SELECT COUNT(cid) FROM comments WHERE pid = '%d' AND status = 0", $id); - $cache[$nid] = ($result) ? db_result($result, 0) : 0; + $cache[$nid] = $result ? db_result($result, 0) : 0; } - return $num_replies[$nid]; + return $cache[$nid]; } /** diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 7340ffbb2..2c0de7923 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1332,10 +1332,10 @@ function comment_num_replies($id) { if (empty($cache[$nid])) { $result = db_query("SELECT COUNT(cid) FROM comments WHERE pid = '%d' AND status = 0", $id); - $cache[$nid] = ($result) ? db_result($result, 0) : 0; + $cache[$nid] = $result ? db_result($result, 0) : 0; } - return $num_replies[$nid]; + return $cache[$nid]; } /** |