0001-turns-languages_lookup-into-a-cache-by-using.patch

Jens Krämer, 2017-02-06 11:56

Download (758 Bytes)

View differences:

lib/redmine/i18n.rb
130 130
    end
131 131

  
132 132
    def find_language(lang)
133
      @@languages_lookup = valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k }
133
      @@languages_lookup ||= valid_languages.inject({}) {|k, v| k[v.to_s.downcase] = v; k }
134 134
      @@languages_lookup[lang.to_s.downcase]
135 135
    end
136 136

  
137
-