diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2009-02-21 00:23:28 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2009-02-21 00:23:28 +0000 |
commit | 9a986ac0a51fe844eee816325e6a6d4122136d9a (patch) | |
tree | ae6e1de2aaa6adb2fc6952c47bf2fb79a644cb7d /lib | |
parent | 00b568c194db8fe1e1979795dfe548148647f431 (diff) | |
download | redmine-9a986ac0a51fe844eee816325e6a6d4122136d9a.tar.gz redmine-9a986ac0a51fe844eee816325e6a6d4122136d9a.zip |
Refactored the mess known as Hook default_url_options in favor of the simpler
:only_path as suggested by splatteal on GitHub.
#2542
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2491 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/hook.rb | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/redmine/hook.rb b/lib/redmine/hook.rb index bcd23b64f..63d7a5961 100644 --- a/lib/redmine/hook.rb +++ b/lib/redmine/hook.rb @@ -60,16 +60,7 @@ module Redmine returning [] do |response| hls = hook_listeners(hook) if hls.any? - request = context[:request] - if request - default_url_options[:host] ||= request.env["SERVER_NAME"] - # Only set port if it's requested and isn't port 80. Otherwise a url - # like: +http://example.com:/url+ may be generated - if request.env["SERVER_PORT"] && request.env["SERVER_PORT"] != 80 - default_url_options[:port] ||= request.env["SERVER_PORT"] - end - default_url_options[:protocol] ||= request.protocol - end + default_url_options[:only_path] ||= true hls.each {|listener| response << listener.send(hook, context)} end end |