Fixed web server detection (skip self notifications).
This commit is contained in:
parent
23b9b8867c
commit
be2a050890
2 changed files with 4 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Observer::Ticket::Notification < ActiveRecord::Observer
|
||||||
EventBuffer.reset
|
EventBuffer.reset
|
||||||
|
|
||||||
via_web = false
|
via_web = false
|
||||||
if ENV['SERVER_NAME']
|
if ENV['RACK_ENV'] || defined? Rails.configuration.webserver_is_active
|
||||||
via_web = true
|
via_web = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
# This file is used by Rack-based servers to start the application.
|
# This file is used by Rack-based servers to start the application.
|
||||||
|
|
||||||
|
# set config to do no self notification
|
||||||
|
Rails.configuration.webserver_is_active = true
|
||||||
|
|
||||||
require ::File.expand_path('../config/environment', __FILE__)
|
require ::File.expand_path('../config/environment', __FILE__)
|
||||||
run Zammad::Application
|
run Zammad::Application
|
||||||
|
|
Loading…
Reference in a new issue