Skip to content

Commit

Permalink
Fix travis build on album art
Browse files Browse the repository at this point in the history
  • Loading branch information
Afterster committed May 27, 2014
1 parent 1e5cded commit c90ee9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions image.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
$art = new Art($media->id,$type);
$art->get_db();
$etag = $art->id;

// That means the client has a cached version of the image
$reqheaders = getallheaders();
if (isset($reqheaders['If-Modified-Since']) && isset($reqheaders['If-None-Match'])) {
Expand Down Expand Up @@ -144,14 +144,14 @@
if (!empty($image)) {
$extension = Art::extension($mime);
$filename = scrub_out($filename . '.' . $extension);

// Send the headers and output the image
$browser = new Horde_Browser();
if (!empty($etag)) {
header('ETag: ' . $etag);
header('Cache-Control: private');
header('Last-Modified: '.gmdate('D, d M Y H:i:s \G\M\T', time()));
}
header('Cache-Control: private');
header('Last-Modified: '.gmdate('D, d M Y H:i:s \G\M\T', time()));
$browser->downloadHeaders($filename, $mime, true);
echo $image;
}
2 changes: 1 addition & 1 deletion lib/class/art.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function get_db()
$this->thumb = $data['thumb'];
$this->thumb_mime = $data['thumb_mime'];
} else {
debug_event('Art','Unable to retrieve or generate thumbnail for ' . $type . '::' . $id,1);
debug_event('Art','Unable to retrieve or generate thumbnail for ' . $this->type . '::' . $this->id,1);
}
} // if no thumb, but art and we want to resize

Expand Down

0 comments on commit c90ee9b

Please sign in to comment.