mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 11:36:05 +08:00
add option to force DirectoryItem.refresh_period! to run even if user directory is disabled
This commit is contained in:
parent
9dc9ca4ac0
commit
ec3d800492
|
@ -25,10 +25,10 @@ class DirectoryItem < ActiveRecord::Base
|
||||||
period_types.each_key { |p| refresh_period!(p) }
|
period_types.each_key { |p| refresh_period!(p) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.refresh_period!(period_type)
|
def self.refresh_period!(period_type, force: false)
|
||||||
|
|
||||||
# Don't calculate it if the user directory is disabled
|
# Don't calculate it if the user directory is disabled
|
||||||
return unless SiteSetting.enable_user_directory?
|
return unless SiteSetting.enable_user_directory? || force
|
||||||
|
|
||||||
since =
|
since =
|
||||||
case period_type
|
case period_type
|
||||||
|
|
Loading…
Reference in New Issue
Block a user