mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 04:53:51 +08:00
19 lines
343 B
Ruby
19 lines
343 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class ProblemCheck::ImageMagick < ProblemCheck
|
||
|
self.priority = "low"
|
||
|
|
||
|
def call
|
||
|
return no_problem if !SiteSetting.create_thumbnails
|
||
|
return no_problem if Kernel.system("command -v convert >/dev/null;")
|
||
|
|
||
|
problem
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def translation_key
|
||
|
"dashboard.image_magick_warning"
|
||
|
end
|
||
|
end
|