Project

General

Profile

Actions

Patch #44628

open

Remove the deprecated _is_pdf parameter from Redmine::Thumbnail.generate

Added by Go MAEDA 2 days ago. Updated 1 day ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:

Description

Since r24266 (#43451), Redmine::Thumbnail.generate has used the MIME type of the source file to detect PDFs. Its fourth parameter, _is_pdf, has therefore been unused. It was kept only for backward compatibility, and TODO comments in the code say it should be removed in Redmine 7.0.

The attached patch removes this parameter:

  • Redmine::Thumbnail.generate now takes three arguments: source, target and size.
  • Attachment#thumbnail no longer passes is_pdf? to the method.
  • The TODO comments about the deprecation are removed.

Plugins that call Redmine::Thumbnail.generate with four arguments will raise an ArgumentError after this change. They should drop the fourth argument.


Files

Actions

Also available in: Atom PDF