diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2013-06-06 20:32:47 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2013-06-06 20:32:47 +0200 |
| commit | 63334514555acea665186f20046a49a5ed41c334 (patch) | |
| tree | 49fb58d9b8bcde36cab13ddae7cfc6230878d06c /phpBB/includes/feed/topic_base.php | |
| parent | 3efe0eb24687a0e36e316b60887eff3ed45ae9b4 (diff) | |
| download | forums-63334514555acea665186f20046a49a5ed41c334.tar forums-63334514555acea665186f20046a49a5ed41c334.tar.gz forums-63334514555acea665186f20046a49a5ed41c334.tar.bz2 forums-63334514555acea665186f20046a49a5ed41c334.tar.xz forums-63334514555acea665186f20046a49a5ed41c334.zip | |
[ticket/11481] Remove globals and use dependency injection instead
PHPBB3-11481
Diffstat (limited to 'phpBB/includes/feed/topic_base.php')
| -rw-r--r-- | phpBB/includes/feed/topic_base.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/phpBB/includes/feed/topic_base.php b/phpBB/includes/feed/topic_base.php index 959ed5c469..0c845c30bd 100644 --- a/phpBB/includes/feed/topic_base.php +++ b/phpBB/includes/feed/topic_base.php @@ -45,17 +45,15 @@ abstract class phpbb_feed_topic_base extends phpbb_feed_base function adjust_item(&$item_row, &$row) { - global $phpEx, $config, $user; + $item_row['link'] = $this->helper->append_sid('/viewtopic.' . $this->phpEx, 't=' . $row['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id']); - $item_row['link'] = $this->helper->append_sid('/viewtopic.' . $phpEx, 't=' . $row['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id']); - - if ($config['feed_item_statistics']) + if ($this->config['feed_item_statistics']) { - $item_row['statistics'] = $user->lang['POSTED'] . ' ' . $user->lang['POST_BY_AUTHOR'] . ' ' . $this->user_viewprofile($row) - . ' ' . $this->separator_stats . ' ' . $user->format_date($row[$this->get('published')]) - . ' ' . $this->separator_stats . ' ' . $user->lang['REPLIES'] . ' ' . (($this->is_moderator_approve_forum($row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies']) - . ' ' . $this->separator_stats . ' ' . $user->lang['VIEWS'] . ' ' . $row['topic_views'] - . (($this->is_moderator_approve_forum($row['forum_id']) && ($row['topic_replies_real'] != $row['topic_replies'])) ? ' ' . $this->separator_stats . ' ' . $user->lang['POSTS_UNAPPROVED'] : ''); + $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->is_moderator_approve_forum($row['forum_id'])) ? $row['topic_replies_real'] : $row['topic_replies']) + . ' ' . $this->separator_stats . ' ' . $this->user->lang['VIEWS'] . ' ' . $row['topic_views'] + . (($this->is_moderator_approve_forum($row['forum_id']) && ($row['topic_replies_real'] != $row['topic_replies'])) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POSTS_UNAPPROVED'] : ''); } } } |
