Don't show hidden for single_thread and single_remark

This commit is contained in:
swag 2023-06-02 15:11:15 -04:00
parent 8c1681da0c
commit bb22c3c775
3 changed files with 4 additions and 2 deletions

View File

@ -87,7 +87,8 @@ sub by_id($self, $remark_id) {
remark_body AS body,
thread_id
FROM remarks
WHERE remark_id = ?;
WHERE remark_id = ?
AND NOT hidden_status;
END_SQL
}

View File

@ -82,6 +82,7 @@ sub by_id($self, $thread_id) {
LEFT JOIN remarks AS r
ON t.thread_id = r.thread_id
WHERE t.thread_id = ?
AND NOT t.hidden_status
GROUP BY t.thread_id;
END_SQL
}

View File

@ -38,7 +38,7 @@
</article>
</main>
<% } =%>
<% if (scalar @{$remarks}) { =%>
<% if (keys %{$thread} && scalar @{$remarks}) { =%>
<section class="pager" id="remarks">
<h3 class="pager__title">Remarks</h3>
<% for my $remark (@{$remarks}) { =%>