diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-12-25 03:54:59 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2013-12-25 04:58:28 +0530 |
commit | e2f72539e101906d9427963f2f92893e4a39b029 (patch) | |
tree | c0637b63c3f3a9fa55d2a5a4ec5fc189ab74bfbb /phpBB/phpbb/feed | |
parent | 7a971f896d9a09037959d26794b8efe09aa1258e (diff) | |
download | forums-e2f72539e101906d9427963f2f92893e4a39b029.tar forums-e2f72539e101906d9427963f2f92893e4a39b029.tar.gz forums-e2f72539e101906d9427963f2f92893e4a39b029.tar.bz2 forums-e2f72539e101906d9427963f2f92893e4a39b029.tar.xz forums-e2f72539e101906d9427963f2f92893e4a39b029.zip |
[ticket/11271] Use class variable $db instead of global
PHPBB3-11271
Diffstat (limited to 'phpBB/phpbb/feed')
-rw-r--r-- | phpBB/phpbb/feed/post_base.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/phpbb/feed/post_base.php b/phpBB/phpbb/feed/post_base.php index b126ad0e4a..fa59a5022e 100644 --- a/phpBB/phpbb/feed/post_base.php +++ b/phpBB/phpbb/feed/post_base.php @@ -60,8 +60,6 @@ abstract class post_base extends \phpbb\feed\base function fetch_attachments() { - global $db; - $sql_array = array( 'SELECT' => 'a.*', 'FROM' => array( @@ -86,14 +84,14 @@ abstract class post_base extends \phpbb\feed\base $sql_array['WHERE'] .= 'AND t.forum_id = ' . (int) $this->forum_id; } - $sql = $db->sql_build_query('SELECT', $sql_array); - $result = $db->sql_query($sql); + $sql = $this->db->sql_build_query('SELECT', $sql_array); + $result = $this->db->sql_query($sql); // Set attachments in feed items - while ($row = $db->sql_fetchrow($result)) + while ($row = $this->db->sql_fetchrow($result)) { $this->attachments[$row['post_msg_id']][] = $row; } - $db->sql_freeresult($result); + $this->db->sql_freeresult($result); } } |