mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Support quarterly on user directory
This commit is contained in:
@@ -13,7 +13,7 @@ class DirectoryItem < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.period_types
|
||||
@types ||= Enum.new(:all, :yearly, :monthly, :weekly, :daily)
|
||||
@types ||= Enum.new(:all, :yearly, :monthly, :weekly, :daily, :quarterly)
|
||||
end
|
||||
|
||||
def self.refresh!
|
||||
@@ -28,6 +28,7 @@ class DirectoryItem < ActiveRecord::Base
|
||||
since = case period_type
|
||||
when :daily then 1.day.ago
|
||||
when :weekly then 1.week.ago
|
||||
when :quarterly then 3.weeks.ago
|
||||
when :monthly then 1.month.ago
|
||||
when :yearly then 1.year.ago
|
||||
else 1000.years.ago
|
||||
|
||||
Reference in New Issue
Block a user