REVIEW: removes the automatic detection of the relative_url_root as it is no longer supported

* need to have a single point to set the relative_url
pull/1186/head
Jens Ulferts 12 years ago
parent d5a23fc3d5
commit 8e5efd6170
  1. 3
      app/controllers/settings_controller.rb
  2. 15
      lib/redmine/utils.rb

@ -38,8 +38,7 @@ class SettingsController < ApplicationController
@options[:user_format] = User::USER_FORMATS.keys.collect {|f| [User.current.name(f), f.to_s] }
@deliveries = ActionMailer::Base.perform_deliveries
@guessed_host_and_path = request.host_with_port.dup
@guessed_host_and_path << ('/'+ Redmine::Utils.relative_url_root.gsub(%r{^\/}, '')) unless Redmine::Utils.relative_url_root.blank?
@guessed_host_and_path = request.host_with_port.dup + Redmine::Utils.relative_url_root.to_s
Redmine::Themes.rescan
end

@ -15,21 +15,8 @@
module Redmine
module Utils
class << self
# Returns the relative root url of the application
def relative_url_root
ActionController::Base.respond_to?('relative_url_root') ?
ActionController::Base.relative_url_root.to_s :
ActionController::AbstractRequest.relative_url_root.to_s
end
# Sets the relative root url of the application
def relative_url_root=(arg)
if ActionController::Base.respond_to?('relative_url_root=')
ActionController::Base.relative_url_root=arg
else
ActionController::AbstractRequest.relative_url_root=arg
end
end
attr_accessor :relative_url_root
end
end
end

Loading…
Cancel
Save