mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 06:46:05 -04:00
Fix a bug in the way we set the mime type for protected image renders.
Also whitelist the digibug controller so that it's accessible when the gallery is private, and don't expire old proxies right away since Digibug may request the full size multiple times for different preview operations. Fixes ticket #1410.
This commit is contained in:
@@ -95,16 +95,11 @@ class Digibug_Controller extends Controller {
|
||||
|
||||
if (!TEST_MODE) {
|
||||
// Dump out the image
|
||||
header("Content-Type: $proxy->item->mime_type");
|
||||
header("Content-Type: {$proxy->item->mime_type}");
|
||||
Kohana::close_buffers(false);
|
||||
$fd = fopen($file, "rb");
|
||||
fpassthru($fd);
|
||||
fclose($fd);
|
||||
|
||||
// If the request was for the image and not the thumb, then delete the proxy.
|
||||
if ($type == "full") {
|
||||
$proxy->delete();
|
||||
}
|
||||
}
|
||||
|
||||
$this->_clean_expired();
|
||||
|
||||
Reference in New Issue
Block a user