Corrige problema para visualizar miniaturas de archivos PDF
Se aplica parche previsto para la versión 4.1.2 de Redmine, por lo que no se documentan los archivos modificados. Resuelve #500
This commit is contained in:
parent
1d7bec0ca3
commit
8b19a0fac0
3 changed files with 15 additions and 8 deletions
15
README.md
15
README.md
|
@ -34,37 +34,38 @@ License v2* (GPL).
|
||||||
|
|
||||||
### Redmine Additionals plugin
|
### Redmine Additionals plugin
|
||||||
|
|
||||||
* additionals 2.0.20
|
* additionals 3.0.0
|
||||||
* https://alphanodes.com/redmine-additionals
|
* https://alphanodes.com/redmine-additionals
|
||||||
* https://github.com/alphanodes/additionals.git
|
* https://github.com/alphanodes/additionals.git
|
||||||
|
|
||||||
### Redmine Checklists plugin (Light version)
|
### Redmine Checklists plugin (Light version)
|
||||||
|
|
||||||
* checklists 3.1.10
|
* checklists 3.1.18
|
||||||
* https://www.redmine.org/plugins/redmine_checklists
|
* https://www.redmine.org/plugins/redmine_checklists
|
||||||
* https://www.redmineup.com/pages/plugins/checklists
|
* https://www.redmineup.com/pages/plugins/checklists
|
||||||
|
|
||||||
### Redmine CKEditor plugin
|
### Redmine CKEditor plugin
|
||||||
|
|
||||||
* ckeditor 1.1.5
|
* ckeditor 1.2.3
|
||||||
* https://www.redmine.org/plugins/redmine-ckeditor
|
* https://www.redmine.org/plugins/redmine-ckeditor
|
||||||
* http://github.com/a-ono/redmine_ckeditor
|
* http://github.com/a-ono/redmine_ckeditor
|
||||||
|
|
||||||
### Redmine Glossary Plugin
|
### Redmine Glossary Plugin
|
||||||
|
|
||||||
* glossary 0.9.2
|
* glossary 1.1.0
|
||||||
* https://www.r-labs.org/projects/rp-glossary/wiki/UsageEn
|
* https://www.r-labs.org/projects/rp-glossary/wiki/UsageEn
|
||||||
* https://github.com/torutk/redmine_glossary
|
* https://github.com/torutk/redmine_glossary
|
||||||
|
|
||||||
### Redmine Private Wiki Plugin
|
### Redmine Private Wiki Plugin
|
||||||
|
|
||||||
* private_wiki 0.2.0
|
* private_wiki 0.2.0 (mistraloz)
|
||||||
* http://www.redmine.org/plugins/redmine_private_wiki
|
* http://www.redmine.org/plugins/redmine_private_wiki
|
||||||
* https://github.com/BlueXML/redmine_private_wiki
|
* https://github.com/mistraloz/redmine_private_wiki (*fork* con ajustes para
|
||||||
|
Redmine >= 4.0.3)
|
||||||
|
|
||||||
### Redmine Q&A plugin
|
### Redmine Q&A plugin
|
||||||
|
|
||||||
* questions 1.0.0
|
* questions 1.0.2
|
||||||
* https://www.redmine.org/plugins/redmine_questions
|
* https://www.redmine.org/plugins/redmine_questions
|
||||||
* http://www.redminecrm.com/projects/questions
|
* http://www.redminecrm.com/projects/questions
|
||||||
|
|
||||||
|
|
|
@ -179,6 +179,10 @@ default:
|
||||||
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
|
# the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
|
||||||
#imagemagick_convert_command:
|
#imagemagick_convert_command:
|
||||||
|
|
||||||
|
# Absolute path (e.g. /usr/bin/gs, c:/ghostscript/gs.exe) to
|
||||||
|
# the `gs` binary. Used to generate attachment thumbnails of PDF files.
|
||||||
|
#gs_command:
|
||||||
|
|
||||||
# Configuration of MiniMagick font.
|
# Configuration of MiniMagick font.
|
||||||
#
|
#
|
||||||
# Redmine uses MiniMagick in order to export a gantt chart to a PNG image.
|
# Redmine uses MiniMagick in order to export a gantt chart to a PNG image.
|
||||||
|
|
|
@ -25,6 +25,7 @@ module Redmine
|
||||||
extend Redmine::Utils::Shell
|
extend Redmine::Utils::Shell
|
||||||
|
|
||||||
CONVERT_BIN = (Redmine::Configuration['imagemagick_convert_command'] || 'convert').freeze
|
CONVERT_BIN = (Redmine::Configuration['imagemagick_convert_command'] || 'convert').freeze
|
||||||
|
GS_BIN = (Redmine::Configuration['gs_command'] || 'gs').freeze
|
||||||
ALLOWED_TYPES = %w(image/bmp image/gif image/jpeg image/png application/pdf)
|
ALLOWED_TYPES = %w(image/bmp image/gif image/jpeg image/png application/pdf)
|
||||||
|
|
||||||
# Generates a thumbnail for the source image to target
|
# Generates a thumbnail for the source image to target
|
||||||
|
@ -79,12 +80,13 @@ module Redmine
|
||||||
@gs_available = false
|
@gs_available = false
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
`gs -version`
|
`#{shell_quote GS_BIN} -version`
|
||||||
@gs_available = $?.success?
|
@gs_available = $?.success?
|
||||||
rescue
|
rescue
|
||||||
@gs_available = false
|
@gs_available = false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
logger.warn("gs binary (#{GS_BIN}) not available") unless @gs_available
|
||||||
@gs_available
|
@gs_available
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue