Don't show hidden for single_thread and single_remark

This commit is contained in:
swagg boi 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, remark_body AS body,
thread_id thread_id
FROM remarks FROM remarks
WHERE remark_id = ?; WHERE remark_id = ?
AND NOT hidden_status;
END_SQL END_SQL
} }

View file

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

View file

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