mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
merge
git-svn-id: file:///svn/phpbb/trunk@8773 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d67b943ef6
commit
76a542a03e
2 changed files with 11 additions and 1 deletions
|
@ -456,6 +456,10 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
|||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Close the db connection before sending the file
|
||||
$db->sql_close();
|
||||
|
||||
if (!set_modified_headers($attachment['filetime'], $user->browser))
|
||||
{
|
||||
// Try to deliver in chunks
|
||||
|
|
|
@ -147,7 +147,13 @@ class dbal
|
|||
$this->sql_freeresult($query_id);
|
||||
}
|
||||
|
||||
return $this->_sql_close();
|
||||
// Connection closed correctly. Set db_connect_id to false to prevent errors
|
||||
if (($result = $this->_sql_close()))
|
||||
{
|
||||
$this->db_connect_id = false;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue