FIX: Do not cache translated trust level names in site settings (#11863)
There's no real need to cache these, and the caching can introduce problems when different sites/users are using different locales.
This commit is contained in:
parent
e1c0a003fe
commit
1ccb6583b1
|
@ -9,7 +9,7 @@ class TrustLevelSetting < EnumSiteSetting
|
|||
|
||||
def self.values
|
||||
levels = TrustLevel.all
|
||||
@values ||= valid_values.map { |x|
|
||||
valid_values.map { |x|
|
||||
{
|
||||
name: x.is_a?(Integer) ? "#{x}: #{levels[x.to_i].name}" : x,
|
||||
value: x
|
||||
|
|
Loading…
Reference in New Issue