forked from e621ng/e621ng
fixes #2610: Strip image metadata when creating thumbnails and samples
This commit is contained in:
parent
505f3f7c03
commit
4fea400b79
@ -58,6 +58,8 @@ class BulkUpdateRequest < ActiveRecord::Base
|
|||||||
msg += "#{line}\n"
|
msg += "#{line}\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.approver_id = User.admins.first.id if approver.nil?
|
||||||
|
|
||||||
dmail = Dmail.new(
|
dmail = Dmail.new(
|
||||||
:from_id => approver.id,
|
:from_id => approver.id,
|
||||||
:to_id => approver.id,
|
:to_id => approver.id,
|
||||||
|
@ -15,6 +15,7 @@ module Danbooru
|
|||||||
end
|
end
|
||||||
|
|
||||||
image = flatten(image, width, height)
|
image = flatten(image, width, height)
|
||||||
|
image.strip!
|
||||||
|
|
||||||
image.write(write_path) do
|
image.write(write_path) do
|
||||||
self.quality = resize_quality
|
self.quality = resize_quality
|
||||||
|
@ -106,7 +106,7 @@ class BulkUpdateRequestsControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "1234 for an admin" do
|
context "for an admin" do
|
||||||
should "succeed" do
|
should "succeed" do
|
||||||
post :approve, {:id => @bulk_update_request.id}, {:user_id => @admin.id}
|
post :approve, {:id => @bulk_update_request.id}, {:user_id => @admin.id}
|
||||||
@bulk_update_request.reload
|
@bulk_update_request.reload
|
||||||
|
Loading…
Reference in New Issue
Block a user