[ticket/13569] Add missing sql_freeresults and remove unneeded results

PHPBB3-13569
This commit is contained in:
Marc Alexander 2015-02-02 17:28:07 +01:00
parent 9f59aa59d9
commit a166f6f42c
6 changed files with 7 additions and 2 deletions

View file

@ -234,6 +234,7 @@ function mcp_front_view($id, $mode, $action)
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
)); ));
} }
$db->sql_freeresult($result);
} }
$template->assign_vars(array( $template->assign_vars(array(
@ -290,6 +291,7 @@ function mcp_front_view($id, $mode, $action)
$pm_by_id[(int) $row['msg_id']] = $row; $pm_by_id[(int) $row['msg_id']] = $row;
$pm_list[] = (int) $row['msg_id']; $pm_list[] = (int) $row['msg_id'];
} }
$db->sql_freeresult($result);
$address_list = get_recipient_strings($pm_by_id); $address_list = get_recipient_strings($pm_by_id);

View file

@ -1276,6 +1276,7 @@ function mcp_fork_topic($topic_ids)
$db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); $db->sql_query('INSERT INTO ' . POLL_OPTIONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
} }
$db->sql_freeresult($result);
} }
$sql = 'SELECT * $sql = 'SELECT *

View file

@ -1962,7 +1962,7 @@ class install_install extends module
'bot_ip' => (string) $bot_ary[1], 'bot_ip' => (string) $bot_ary[1],
)); ));
$result = $db->sql_query($sql); $db->sql_query($sql);
} }
} }

View file

@ -154,6 +154,6 @@ class db_text
$sql = 'DELETE $sql = 'DELETE
FROM ' . $this->table . ' FROM ' . $this->table . '
WHERE ' . $this->db->sql_in_set('config_name', $keys, false, true); WHERE ' . $this->db->sql_in_set('config_name', $keys, false, true);
$result = $this->db->sql_query($sql); $this->db->sql_query($sql);
} }
} }

View file

@ -357,6 +357,7 @@ class post extends \phpbb\notification\type\base
{ {
$tracking_data[$row['user_id']] = $row['mark_time']; $tracking_data[$row['user_id']] = $row['mark_time'];
} }
$this->db->sql_freeresult($result);
return $tracking_data; return $tracking_data;
} }

View file

@ -257,6 +257,7 @@ class topic extends \phpbb\notification\type\base
{ {
$tracking_data[$row['user_id']] = $row['mark_time']; $tracking_data[$row['user_id']] = $row['mark_time'];
} }
$this->db->sql_freeresult($result);
return $tracking_data; return $tracking_data;
} }