summaryrefslogtreecommitdiffstats
path: root/image.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-23 22:36:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-23 22:36:23 +0000
commitd3423e0e37a6608edb82a7f6b6aa69d55aafec7d (patch)
tree0821f326d8cccdca64d4e24ce1f7640eee91db5c /image.php
parentcbdb592407c339d8158fb96e0253c1b34e011dc5 (diff)
downloadampache-d3423e0e37a6608edb82a7f6b6aa69d55aafec7d.tar.gz
ampache-d3423e0e37a6608edb82a7f6b6aa69d55aafec7d.tar.bz2
ampache-d3423e0e37a6608edb82a7f6b6aa69d55aafec7d.zip
fixed an album art issue created with the new auth code
Diffstat (limited to 'image.php')
-rw-r--r--image.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/image.php b/image.php
index 2157a6f5..da443b0f 100644
--- a/image.php
+++ b/image.php
@@ -65,13 +65,18 @@ switch ($_REQUEST['type']) {
break;
// If we need to pull the data out of the session
case 'session':
+ vauth::check_session();
$key = scrub_in($_REQUEST['image_index']);
$image = get_image_from_source($_SESSION['form']['images'][$key]);
-
$mime = $_SESSION['form']['images'][$key]['mime'];
$data = explode("/",$mime);
$extension = $data['1'];
+ // Send the headers and output the image
+ header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Pragma: no-cache");
header("Content-type: $mime");
header("Content-Disposition: filename=" . $key . "." . $extension);
echo $image;