diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-08-01 08:26:39 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-08-01 08:26:39 -0700 |
commit | fc580037e797fad48b49fcffa7aa69dca8761972 (patch) | |
tree | f353aa1f6c6bbaf27e9b4b52cd1c073b6df1d8bb /modules/gallery/controllers/file_proxy.php | |
parent | f50151cf1840b1d9d528b76ac9fc4ed20a351759 (diff) | |
parent | a5f701951ee00f85690b804a8c63a9bddc48b67f (diff) |
Merge branch 'master' into dialog
Diffstat (limited to 'modules/gallery/controllers/file_proxy.php')
-rw-r--r-- | modules/gallery/controllers/file_proxy.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index bead9f3f..15b4279f 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -72,8 +72,8 @@ class File_Proxy_Controller extends Controller { // necessary, it's easily resurrected. // If we're looking for a .jpg then it's it's possible that we're requesting the thumbnail - // for a movie. In that case, the .flv, .mp4 or .m4v file would have been converted to a .jpg. - // So try some alternate types: + // for a movie. In that case, the .flv, .mp4 or .m4v file would have been converted to a + // .jpg. So try some alternate types: if (preg_match('/.jpg$/', $path)) { foreach (array("flv", "mp4", "m4v") as $ext) { $movie_path = preg_replace('/.jpg$/', ".$ext", $encoded_path); @@ -131,10 +131,7 @@ class File_Proxy_Controller extends Controller { } else { header("Content-Type: $item->mime_type"); } - Kohana::close_buffers(false); - $fd = fopen($file, "rb"); - fpassthru($fd); - fclose($fd); + readfile($file); } } |