mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-25 07:54:11 -05:00
FEATURE: allow version emails to be disabled globally
This commit is contained in:
parent
ae9fcf17ef
commit
f493eb5d12
2 changed files with 12 additions and 2 deletions
|
@ -18,9 +18,14 @@ module Jobs
|
||||||
DiscourseUpdates.updated_at = Time.zone.now
|
DiscourseUpdates.updated_at = Time.zone.now
|
||||||
DiscourseUpdates.missing_versions = json['versions']
|
DiscourseUpdates.missing_versions = json['versions']
|
||||||
|
|
||||||
if SiteSetting.new_version_emails and json['missingVersionsCount'] > 0 and prev_missing_versions_count < json['missingVersionsCount'].to_i
|
if GlobalSetting.new_version_emails and
|
||||||
|
SiteSetting.new_version_emails and
|
||||||
|
json['missingVersionsCount'] > 0 and
|
||||||
|
prev_missing_versions_count < json['missingVersionsCount'].to_i
|
||||||
|
|
||||||
message = VersionMailer.send_notice
|
message = VersionMailer.send_notice
|
||||||
Email::Sender.new(message, :new_version).send
|
Email::Sender.new(message, :new_version).send
|
||||||
|
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
raise e unless Rails.env.development? # Fail version check silently in development mode
|
raise e unless Rails.env.development? # Fail version check silently in development mode
|
||||||
|
|
|
@ -99,4 +99,9 @@ serve_static_assets = false
|
||||||
sidekiq_workers = 5
|
sidekiq_workers = 5
|
||||||
|
|
||||||
# adjust stylesheets to rtl (requires "rtlit" gem)
|
# adjust stylesheets to rtl (requires "rtlit" gem)
|
||||||
rtl_css = false
|
rtl_css = false
|
||||||
|
|
||||||
|
# notify admin when a new version of discourse is released
|
||||||
|
# this is global so it is easier to set in multisites
|
||||||
|
# TODO allow for global overrides
|
||||||
|
new_version_emails = true
|
||||||
|
|
Loading…
Reference in a new issue