Skip over self-created threads with 0 replies

This commit is contained in:
Alexander Yakovlev 2017-05-04 19:32:40 +07:00
parent 1ed2b8fbd6
commit 6c39986f0c

View file

@ -1,5 +1,6 @@
<?php
// forbidden: forbidden forums IDs
// skips over threads made by this user with 0 replies
function print_email($username, $unsubscription, $threads, $forbidden) {
$message = <<<END
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
@ -26,6 +27,8 @@ END;
foreach ($threads as $thread) {
if (in_array($thread['fid'], $forbidden))
continue;
if ($thread['replies'] === '0' && $thread['username'] === $username)
continue;
$message .= '
<tr>
<td style="padding: 0.5em">'.$thread['forumname'].'</td>