mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 13:28:55 +00:00
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
This commit is contained in:
commit
2787e799e1
1 changed files with 7 additions and 5 deletions
|
@ -464,6 +464,9 @@ class phpbb_feed_base
|
||||||
*/
|
*/
|
||||||
var $separator_stats = "\xE2\x80\x94"; // —
|
var $separator_stats = "\xE2\x80\x94"; // —
|
||||||
|
|
||||||
|
/** @var mixed Query result handle */
|
||||||
|
var $result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
|
@ -617,10 +620,9 @@ class phpbb_feed_base
|
||||||
|
|
||||||
function get_item()
|
function get_item()
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db;
|
||||||
static $result;
|
|
||||||
|
|
||||||
if (!isset($result))
|
if (!isset($this->result))
|
||||||
{
|
{
|
||||||
if (!$this->get_sql())
|
if (!$this->get_sql())
|
||||||
{
|
{
|
||||||
|
@ -629,10 +631,10 @@ class phpbb_feed_base
|
||||||
|
|
||||||
// Query database
|
// Query database
|
||||||
$sql = $db->sql_build_query('SELECT', $this->sql);
|
$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)
|
function user_viewprofile($row)
|
||||||
|
|
Loading…
Add table
Reference in a new issue