diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-07 15:37:17 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-11-07 15:37:17 +0000 |
commit | 006337fb0e8c45813031a0ced14746733692a173 (patch) | |
tree | 727cab16a2946cab12d3c8e88b1edd10cf7ffbe7 /app/controllers | |
parent | 4581baa5c0b64eb7d638876fb2e9288d5f71107c (diff) | |
download | redmine-006337fb0e8c45813031a0ced14746733692a173.tar.gz redmine-006337fb0e8c45813031a0ced14746733692a173.zip |
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
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/settings_controller.rb | 11 |
1 files changed, 7 insertions, 4 deletions
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] |