diff options
author | Tristan Darricau <github@darricau.eu> | 2014-04-20 18:32:34 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-04 15:44:12 +0200 |
commit | 9dc4e5a61f5bfe7299f9f6ffbd851529ad459ba1 (patch) | |
tree | 3ace27af4aa4fa765f9bb0376a7e07bb4e1d2657 /phpBB/phpbb/feed/topic_base.php | |
parent | 68293450f98b97e7f0bf3d62f5835ae08dbbea09 (diff) | |
download | forums-9dc4e5a61f5bfe7299f9f6ffbd851529ad459ba1.tar forums-9dc4e5a61f5bfe7299f9f6ffbd851529ad459ba1.tar.gz forums-9dc4e5a61f5bfe7299f9f6ffbd851529ad459ba1.tar.bz2 forums-9dc4e5a61f5bfe7299f9f6ffbd851529ad459ba1.tar.xz forums-9dc4e5a61f5bfe7299f9f6ffbd851529ad459ba1.zip |
[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
Diffstat (limited to 'phpBB/phpbb/feed/topic_base.php')
-rw-r--r-- | phpBB/phpbb/feed/topic_base.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/phpBB/phpbb/feed/topic_base.php b/phpBB/phpbb/feed/topic_base.php index e8639a6fa6..d25bd0b50f 100644 --- a/phpBB/phpbb/feed/topic_base.php +++ b/phpBB/phpbb/feed/topic_base.php @@ -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']; + } + } } } } |