diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-02 15:08:15 +0200 |
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-02 15:08:15 +0200 |
| commit | fa1ac3c54d471f93b0fb10ef58aba13008dfa119 (patch) | |
| tree | ab69fbc46128753bf4f2bd9968913635bf33fcea /phpBB/phpbb/feed/post_base.php | |
| parent | 4f17d0653ab9eaa51c730f2e1f5ad6fbcfc279ba (diff) | |
| parent | 8812cfcfbf4ae82eb0270c268d227ba729b42107 (diff) | |
| download | forums-fa1ac3c54d471f93b0fb10ef58aba13008dfa119.tar forums-fa1ac3c54d471f93b0fb10ef58aba13008dfa119.tar.gz forums-fa1ac3c54d471f93b0fb10ef58aba13008dfa119.tar.bz2 forums-fa1ac3c54d471f93b0fb10ef58aba13008dfa119.tar.xz forums-fa1ac3c54d471f93b0fb10ef58aba13008dfa119.zip | |
Merge pull request #2336 from Nicofuma/ticket/12413
[ticket/12413] Fatal Error log created for feed.php file
Diffstat (limited to 'phpBB/phpbb/feed/post_base.php')
| -rw-r--r-- | phpBB/phpbb/feed/post_base.php | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php index c797d6a8ca..de98f446f3 100644 --- a/phpBB/phpbb/feed/post_base.php +++ b/phpBB/phpbb/feed/post_base.php @@ -14,7 +14,7 @@ namespace phpbb\feed; * * @package phpBB3 */ -abstract class post_base extends \phpbb\feed\base +abstract class post_base extends \phpbb\feed\attachments_base { var $num_items = 'feed_limit_post'; var $attachments = array(); @@ -49,41 +49,4 @@ abstract class post_base extends \phpbb\feed\base . (($this->is_moderator_approve_forum($row['forum_id']) && $row['post_visibility'] !== ITEM_APPROVED) ? ' ' . $this->separator_stats . ' ' . $this->user->lang['POST_UNAPPROVED'] : ''); } } - - function fetch_attachments() - { - $sql_array = array( - 'SELECT' => 'a.*', - 'FROM' => array( - ATTACHMENTS_TABLE => 'a' - ), - 'WHERE' => 'a.in_message = 0 ', - 'ORDER_BY' => 'a.filetime DESC, a.post_msg_id ASC', - ); - - if (isset($this->topic_id)) - { - $sql_array['WHERE'] .= 'AND a.topic_id = ' . (int) $this->topic_id; - } - else if (isset($this->forum_id)) - { - $sql_array['LEFT_JOIN'] = array( - array( - 'FROM' => array(TOPICS_TABLE => 't'), - 'ON' => 'a.topic_id = t.topic_id', - ) - ); - $sql_array['WHERE'] .= 'AND t.forum_id = ' . (int) $this->forum_id; - } - - $sql = $this->db->sql_build_query('SELECT', $sql_array); - $result = $this->db->sql_query($sql); - - // Set attachments in feed items - while ($row = $this->db->sql_fetchrow($result)) - { - $this->attachments[$row['post_msg_id']][] = $row; - } - $this->db->sql_freeresult($result); - } } |
