Merged development into master

This commit is contained in:
NelsonLaQuet 2013-09-01 05:45:33 -05:00
commit 97c548d61b
2 changed files with 10 additions and 9 deletions

View file

@ -330,11 +330,11 @@
DB::table('followers')->insert([
'id' => $follower->id,
'user_id' => $follower->follower_id,
'artist_at' => $follower->user_at,
'artist_id' => $follower->user_id,
'created_at' => $follower->created_at,
]);
} catch (Exception $e) {
$this->error('Could not sync follower ' . $fav->id . ' because ' . $e->getMessage());
$this->error('Could not sync follower ' . $follower->id . ' because ' . $e->getMessage());
}
}
}

View file

@ -15,17 +15,18 @@
if (!$image)
App::abort(404);
$response = Response::make('', 200);
$filename = $image->getFile($coverType['id']);
$lastModified = filemtime($filename);
if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && $lastModified == $_SERVER['HTTP_IF_MODIFIED_SINCE']) {
header('HTTP/1.0 304 Not Modified');
exit();
if (Config::get('app.sendfile')) {
$response->header('X-Sendfile', $filename);
} else {
$response->header('X-Accel-Redirect', $filename);
}
header('Last-Modified: ' . $lastModified);
header('Cache-Control: max-age=' . (60 * 60 * 24 * 7));
$response->header('Content-Disposition', 'filename="' . $filename . '"');
$response->header('Content-Type', 'image/png');
return File::inline($filename, $image->mime, $image->filename);
return $response;
}
}