diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-03 20:32:10 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-03 20:32:10 +0000 |
commit | 2f99823b0e1e8bbb597fd95a83ac16b1ae4159cc (patch) | |
tree | 8a7a3ff3b5b34ea97677c8178d5de235b6832fc6 | |
parent | c447e12274a04ea5822e2bfc6f3183b6e750550d (diff) | |
download | redmine-2f99823b0e1e8bbb597fd95a83ac16b1ae4159cc.tar.gz redmine-2f99823b0e1e8bbb597fd95a83ac16b1ae4159cc.zip |
Ignores @imagemagick_convert_command@ option when generating an image in Gantt module (#42145).
git-svn-id: https://svn.redmine.org/redmine/trunk@23597 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/helpers/gantt.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index 43e0986c6..76490f286 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -396,7 +396,13 @@ module Redmine Redmine::Configuration['rmagick_font_path'].presence img = MiniMagick::Image.create(".#{format}") if Redmine::Configuration['imagemagick_convert_command'].present? - MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command']) + if MiniMagick.respond_to?(:cli_path) + MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command']) + else + Rails.logger.warn( + 'imagemagick_convert_command option is ignored because MiniMagick has removed the option to define a custom path for the binary. Please ensure the convert binary is available in your PATH.' + ) + end end MiniMagick.convert do |gc| gc.size('%dx%d' % [subject_width + g_width + 1, height]) |