- Fixed bug in comment_num_replies() causing problems in the tracker module
(and potentially in the forum module).4.2.x
parent
8ae2520965
commit
dadf09d8c8
|
@ -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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue