mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
some more fixes
git-svn-id: file:///svn/phpbb/trunk@7875 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -322,7 +322,20 @@ function send_avatar_to_browser($file)
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
readfile($file_path);
|
||||
if (@readfile($file_path) === false)
|
||||
{
|
||||
$fp = @fopen($file_path, 'rb');
|
||||
|
||||
if ($fp !== false)
|
||||
{
|
||||
while (!feof($fp))
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
|
||||
flush();
|
||||
}
|
||||
else
|
||||
@@ -447,6 +460,10 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
@readfile($filename);
|
||||
}
|
||||
|
||||
flush();
|
||||
exit;
|
||||
|
Reference in New Issue
Block a user