1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-30 11:40:08 +02:00

[ticket/12459] Fix: Soft deleted topics should appear in feeds

As for the posts, a soft deleted topic should appear (with a corresponding
message) in topic's based feeds.

PHPBB3-12459
This commit is contained in:
Tristan Darricau
2014-04-20 18:32:34 +02:00
committed by Tristan Darricau
parent 68293450f9
commit 9dc4e5a61f
5 changed files with 28 additions and 15 deletions

View File

@@ -45,9 +45,24 @@ abstract class topic_base extends \phpbb\feed\attachments_base
{
$item_row['statistics'] = $this->user->lang['POSTED'] . ' ' . $this->user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row)
. ' ' . $this->separator_stats . ' ' . $this->user->format_date($row[$this->get('published')])
. ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . $this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1
. ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views']
. (($this->is_moderator_approve_forum($row['forum_id']) && $row['topic_posts_unapproved']) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'] : '');
. ' ' . $this->separator_stats . ' ' . $this->user->lang['REPLIES'] . ' ' . ($this->content_visibility->get_count('topic_posts', $row, $row['forum_id']) - 1)
. ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views'];
if ($this->is_moderator_approve_forum($row['forum_id']))
{
if ( (int)$row['topic_visibility'] === ITEM_DELETED)
{
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_DELETED'];
}
else if ((int)$row['topic_visibility'] === ITEM_UNAPPROVED)
{
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['TOPIC_UNAPPROVED'];
}
else if ($row['topic_posts_unapproved'])
{
$item_row['statistics'] .= ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'];
}
}
}
}
}