diff options
author | Andreas Fischer <bantu@phpbb.com> | 2015-02-03 20:36:53 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2015-02-03 20:36:53 +0100 |
commit | f9ab676530b862798f3eea6bf53415ca3b0faff8 (patch) | |
tree | e474bd7a769552e1c57b124a289260467d6eee83 /phpBB/phpbb | |
parent | 284aa8c496d658c196a0dfa3c90657415ee4c2ee (diff) | |
parent | 1e4853507abb3fc50d6d7edd048d3cf88e905f1c (diff) | |
download | forums-f9ab676530b862798f3eea6bf53415ca3b0faff8.tar forums-f9ab676530b862798f3eea6bf53415ca3b0faff8.tar.gz forums-f9ab676530b862798f3eea6bf53415ca3b0faff8.tar.bz2 forums-f9ab676530b862798f3eea6bf53415ca3b0faff8.tar.xz forums-f9ab676530b862798f3eea6bf53415ca3b0faff8.zip |
Merge branch 'develop-ascraeus' into develop
* develop-ascraeus:
[ticket/13348] Remove unnecessary global $cache
[ticket/13348] Use close method to free query result handle
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/feed/base.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/phpBB/phpbb/feed/base.php b/phpBB/phpbb/feed/base.php index e31854160a..322e2ee9f1 100644 --- a/phpBB/phpbb/feed/base.php +++ b/phpBB/phpbb/feed/base.php @@ -67,6 +67,9 @@ abstract class base */ var $separator_stats = "\xE2\x80\x94"; // — + /** @var mixed Query result handle */ + protected $result; + /** * Constructor * @@ -229,9 +232,7 @@ abstract class base function get_item() { - static $result; - - if (!isset($result)) + if (!isset($this->result)) { if (!$this->get_sql()) { @@ -240,10 +241,10 @@ abstract class base // Query database $sql = $this->db->sql_build_query('SELECT', $this->sql); - $result = $this->db->sql_query_limit($sql, $this->num_items); + $this->result = $this->db->sql_query_limit($sql, $this->num_items); } - return $this->db->sql_fetchrow($result); + return $this->db->sql_fetchrow($this->result); } function user_viewprofile($row) |