aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/feed/post_base.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/phpbb/feed/post_base.php')
-rw-r--r--phpBB/phpbb/feed/post_base.php39
1 files changed, 24 insertions, 15 deletions
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php
index 42c5eea9e3..f6dc39cbec 100644
--- a/phpBB/phpbb/feed/post_base.php
+++ b/phpBB/phpbb/feed/post_base.php
@@ -1,24 +1,29 @@
<?php
/**
-*
-* @package phpBB3
-* @copyright (c) 2013 phpBB Group
-* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
-*
-*/
+ *
+ * This file is part of the phpBB Forum Software package.
+ *
+ * @copyright (c) phpBB Limited <https://www.phpbb.com>
+ * @license GNU General Public License, version 2 (GPL-2.0)
+ *
+ * For full copyright and license information, please see
+ * the docs/CREDITS.txt file.
+ *
+ */
namespace phpbb\feed;
/**
-* Abstract class for post based feeds
-*
-* @package phpBB3
-*/
-abstract class post_base extends \phpbb\feed\base
+ * Abstract class for post based feeds
+ */
+abstract class post_base extends attachments_base
{
- var $num_items = 'feed_limit_post';
+ protected $num_items = 'feed_limit_post';
- function set_keys()
+ /**
+ * {@inheritdoc}
+ */
+ public function set_keys()
{
$this->set('title', 'post_subject');
$this->set('title2', 'topic_title');
@@ -37,7 +42,10 @@ abstract class post_base extends \phpbb\feed\base
$this->set('enable_magic_url', 'enable_magic_url');
}
- function adjust_item(&$item_row, &$row)
+ /**
+ * {@inheritdoc}
+ */
+ public function adjust_item(&$item_row, &$row)
{
$item_row['link'] = $this->helper->append_sid('viewtopic.' . $this->phpEx, "t={$row['topic_id']}&amp;p={$row['post_id']}#p{$row['post_id']}");
@@ -45,7 +53,8 @@ abstract class post_base extends \phpbb\feed\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->is_moderator_approve_forum($row['forum_id']) && $row['post_visibility'] !== ITEM_APPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '');
+ . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_UNAPPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : '')
+ . (($this->is_moderator_approve_forum($row['forum_id']) && (int) $row['post_visibility'] === ITEM_DELETED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_DELETED'] : '');
}
}
}