diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-29 07:21:47 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-07-29 07:21:47 +0000 |
commit | 755ab35f6b6b0e78bbff6ca24f3f44008d9a4f71 (patch) | |
tree | bef53f58330458ed620afd0e9ada526355d99ff7 /image.php | |
parent | ee9999a93074c737ffc298c8370ef05a3121cfa0 (diff) | |
download | ampache-755ab35f6b6b0e78bbff6ca24f3f44008d9a4f71.tar.gz ampache-755ab35f6b6b0e78bbff6ca24f3f44008d9a4f71.tar.bz2 ampache-755ab35f6b6b0e78bbff6ca24f3f44008d9a4f71.zip |
fixed the album art gathering, enabled art resizing and saving of said stuff... not sure if saving and retriving is saving any time. tweaked show test config wording
Diffstat (limited to 'image.php')
-rw-r--r-- | image.php | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -72,24 +72,28 @@ switch ($_REQUEST['type']) { // Attempt to pull art from the database $art = $album->get_art(); - if (!$art['art_mime']) { + if (!$art['mime']) { header('Content-type: image/gif'); readfile(Config::get('prefix') . Config::get('theme_path') . '/images/blankalbum.gif'); break; } // else no image // Print the album art - $data = explode("/",$art['art_mime']); + $data = explode("/",$art['mime']); $extension = $data['1']; -// if (empty($_REQUEST['thumb'])) { - $art_data = $art['art']; -// } - //else { - // $art_data = img_resize($art,$size,$extension,$_REQUEST['id']); - //} + if (empty($_REQUEST['thumb'])) { + $art_data = $art['raw']; + } + else { + $art_data = img_resize($art,$size,$extension,$_REQUEST['id']); + } // 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=" . $album->name . "." . $extension); echo $art_data; |