Commit c9457a4a authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't count deleted comments


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent be9284d6
......@@ -305,7 +305,7 @@ class ArtefactTypeComment extends ArtefactType {
return get_records_sql_assoc('
SELECT c.onview, COUNT(c.artefact) AS comments
FROM {artefact_comment_comment} c
WHERE c.onview IN (' . join(',', $viewids) . ')
WHERE c.onview IN (' . join(',', $viewids) . ') AND c.deletedby IS NULL
GROUP BY c.onview
', array());
}
......@@ -313,7 +313,7 @@ class ArtefactTypeComment extends ArtefactType {
return get_records_sql_assoc('
SELECT c.onartefact, COUNT(c.artefact) AS comments
FROM {artefact_comment_comment} c
WHERE c.onartefact IN (' . join(',', $artefactids) . ')
WHERE c.onartefact IN (' . join(',', $artefactids) . ') AND c.deletedby IS NULL
GROUP BY c.onartefact
', array());
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment