diff options
author | Andreas Fischer <bantu@phpbb.com> | 2015-02-03 20:36:27 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2015-02-03 20:36:27 +0100 |
commit | 2787e799e17ee1358246087fe44ecf7ca9c4f9ed (patch) | |
tree | 73290c3f275538c0388957feaa25a54a462981e5 | |
parent | e86b7ce56260264102e60c0d248c26bebea31d4e (diff) | |
parent | 4e06ab16f008a48944f1dfde1d06394126e54541 (diff) | |
download | forums-2787e799e17ee1358246087fe44ecf7ca9c4f9ed.tar forums-2787e799e17ee1358246087fe44ecf7ca9c4f9ed.tar.gz forums-2787e799e17ee1358246087fe44ecf7ca9c4f9ed.tar.bz2 forums-2787e799e17ee1358246087fe44ecf7ca9c4f9ed.tar.xz forums-2787e799e17ee1358246087fe44ecf7ca9c4f9ed.zip |
Merge pull request #3365 from marc1706/ticket/13348-olympus
[ticket/13348] Use close method to free query result handle
* marc1706/ticket/13348-olympus:
[ticket/13348] Remove unnecessary global $cache
[ticket/13348] Use close method to free query result handle
-rw-r--r-- | phpBB/feed.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/feed.php b/phpBB/feed.php index 9816f0f303..7e1a761694 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -464,6 +464,9 @@ class phpbb_feed_base */ var $separator_stats = "\xE2\x80\x94"; // — + /** @var mixed Query result handle */ + var $result; + /** * Constructor */ @@ -617,10 +620,9 @@ class phpbb_feed_base function get_item() { - global $db, $cache; - static $result; + global $db; - if (!isset($result)) + if (!isset($this->result)) { if (!$this->get_sql()) { @@ -629,10 +631,10 @@ class phpbb_feed_base // Query database $sql = $db->sql_build_query('SELECT', $this->sql); - $result = $db->sql_query_limit($sql, $this->num_items); + $this->result = $db->sql_query_limit($sql, $this->num_items); } - return $db->sql_fetchrow($result); + return $db->sql_fetchrow($this->result); } function user_viewprofile($row) |