From 006337fb0e8c45813031a0ced14746733692a173 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 7 Nov 2008 15:37:17 +0000 Subject: Host setting should contain the path prefix (Redmine base URL) to properly generate links in emails that are sent offline (#2122). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1989 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/settings_controller.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'app/controllers') diff --git a/app/controllers/settings_controller.rb b/app/controllers/settings_controller.rb index 6482a3576..7f9c9d5cc 100644 --- a/app/controllers/settings_controller.rb +++ b/app/controllers/settings_controller.rb @@ -5,19 +5,19 @@ # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class SettingsController < ApplicationController before_filter :require_admin - + def index edit render :action => 'edit' @@ -39,8 +39,11 @@ class SettingsController < ApplicationController @options = {} @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 + @guessed_host_and_path << ('/'+ request.relative_url_root.gsub(%r{^\/}, '')) unless request.relative_url_root.blank? end - + def plugin plugin_id = params[:id].to_sym @plugin = Redmine::Plugin.registered_plugins[plugin_id] -- cgit v1.2.3