Project

General

Profile

Actions

Patch #25014

closed

redmine/i18n.rb - languages_lookup class variable is rebuilt every time

Added by Jens Krämer about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Category:
I18n
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

the @@languages_lookup variable in redmine/i18n.rb appears to be intended as a cache but is assigned to a new value everytime find_language is called.

Attached patch fixes this by using ||= instead of =.


Files

Actions #1

Updated by Go MAEDA about 7 years ago

  • Target version set to 3.4.0

Since find_language method is called on every request, I think caching values is reasonable.
Setting target version to 3.4.0.

Actions #2

Updated by Jean-Philippe Lang about 7 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang

Committed, thanks for the fix.

Actions

Also available in: Atom PDF