diff options
author | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-28 08:34:34 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@gitlab.com> | 2015-04-28 08:34:34 +0000 |
commit | 8140c6828905345ea510b23ee09e53f01a74f97d (patch) | |
tree | fb65a901dd5b0c331e162f819fafe963dc84ab56 /app | |
parent | f0227d761fa24b7f0fdf0b5fecd6d52a6d991714 (diff) | |
parent | e3d2304d6971c42436e711ccf70b8e4d5114f887 (diff) | |
download | gitlab-ce-8140c6828905345ea510b23ee09e53f01a74f97d.tar.gz |
Merge branch 'rs-issue-2269' into 'master'
Remove duplicate settings for default_url_options
Closes #2269
See merge request !1797
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/application_controller.rb | 12 | ||||
-rw-r--r-- | app/mailers/notify.rb | 7 | ||||
-rw-r--r-- | app/models/project_services/gitlab_issue_tracker_service.rb | 5 |
3 files changed, 1 insertions, 23 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cfe2c76265c..69fd7901832 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -182,18 +182,6 @@ class ApplicationController < ActionController::Base response.headers["Expires"] = "Fri, 01 Jan 1990 00:00:00 GMT" end - def default_url_options - if !Rails.env.test? - port = Gitlab.config.gitlab.port unless Gitlab.config.gitlab_on_standard_port? - { host: Gitlab.config.gitlab.host, - protocol: Gitlab.config.gitlab.protocol, - port: port, - script_name: Gitlab.config.gitlab.relative_url_root } - else - super - end - end - def default_headers headers['X-Frame-Options'] = 'DENY' headers['X-XSS-Protection'] = '1; mode=block' diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 2c0d451511f..79fb48b00d3 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -16,11 +16,6 @@ class Notify < ActionMailer::Base attr_accessor :current_user helper_method :current_user, :can? - default_url_options[:host] = Gitlab.config.gitlab.host - default_url_options[:protocol] = Gitlab.config.gitlab.protocol - default_url_options[:port] = Gitlab.config.gitlab.port unless Gitlab.config.gitlab_on_standard_port? - default_url_options[:script_name] = Gitlab.config.gitlab.relative_url_root - default from: Proc.new { default_sender_address.format } default reply_to: Gitlab.config.gitlab.email_reply_to @@ -69,7 +64,7 @@ class Notify < ActionMailer::Base # Only the displayed name changes; the actual email address is always the same. def sender(sender_id, send_from_user_email = false) return unless sender = User.find(sender_id) - + address = default_sender_address address.display_name = sender.name diff --git a/app/models/project_services/gitlab_issue_tracker_service.rb b/app/models/project_services/gitlab_issue_tracker_service.rb index 5f0553f3b0b..0ebc0a3ba1a 100644 --- a/app/models/project_services/gitlab_issue_tracker_service.rb +++ b/app/models/project_services/gitlab_issue_tracker_service.rb @@ -21,11 +21,6 @@ class GitlabIssueTrackerService < IssueTrackerService include Rails.application.routes.url_helpers - default_url_options[:host] = Gitlab.config.gitlab.host - default_url_options[:protocol] = Gitlab.config.gitlab.protocol - default_url_options[:port] = Gitlab.config.gitlab.port unless Gitlab.config.gitlab_on_standard_port? - default_url_options[:script_name] = Gitlab.config.gitlab.relative_url_root - prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url def default? |