FIX: Do not perform grants if badges are disabled

This commit is contained in:
riking
2014-09-02 13:12:27 -07:00
parent defe1dd86f
commit ee812eb447
3 changed files with 7 additions and 1 deletions

View File

@@ -68,6 +68,7 @@ class BadgeGranter
end
def self.queue_badge_grant(type,opt)
return unless SiteSetting.enable_badges
payload = nil
case type
@@ -208,6 +209,7 @@ class BadgeGranter
MAX_ITEMS_FOR_DELTA = 200
def self.backfill(badge, opts=nil)
return unless SiteSetting.enable_badges
return unless badge.query.present? && badge.enabled
post_ids = user_ids = nil