diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-24 16:59:23 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-24 16:59:23 +0000 |
commit | 1cb1be17a98875e2f6b887e8cca281f28714c88f (patch) | |
tree | 7f8b8093d283e26aaf8aedadfa47bfb6bea63b88 /app | |
parent | 97ce6dab6e2988cad7c4a798d851dacc5bca4887 (diff) | |
download | redmine-1cb1be17a98875e2f6b887e8cca281f28714c88f.tar.gz redmine-1cb1be17a98875e2f6b887e8cca281f28714c88f.zip |
Fixed link to user in email notifications (#26506).
git-svn-id: http://svn.redmine.org/redmine/trunk@16876 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/application_helper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e14cff2e7..a2d1fb73c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -53,7 +53,8 @@ module ApplicationHelper if user.is_a?(User) name = h(user.name(options[:format])) if user.active? || (User.current.admin? && user.logged?) - link_to name, user_path(user), :class => user.css_classes + only_path = options[:only_path].nil? ? true : options[:only_path] + link_to name, user_url(user, :only_path => only_path), :class => user.css_classes else name end @@ -905,7 +906,7 @@ module ApplicationHelper end when 'user' u = User.visible.where(:id => oid, :type => 'User').first - link = link_to_user(u) if u + link = link_to_user(u, :only_path => only_path) if u end elsif sep == ':' name = remove_double_quotes(identifier) @@ -966,12 +967,12 @@ module ApplicationHelper end when 'user' u = User.visible.where(:login => name, :type => 'User').first - link = link_to_user(u) if u + link = link_to_user(u, :only_path => only_path) if u end elsif sep == "@" name = remove_double_quotes(identifier) u = User.visible.where(:login => name, :type => 'User').first - link = link_to_user(u) if u + link = link_to_user(u, :only_path => only_path) if u end end (leading + (link || "#{project_prefix}#{prefix}#{repo_prefix}#{sep}#{identifier}#{comment_suffix}")) |