summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/comment.module4
-rw-r--r--modules/comment/comment.module4
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];
}
/**