Index: app/helpers/application_helper.rb =================================================================== --- app/helpers/application_helper.rb (revision 4260) +++ app/helpers/application_helper.rb (working copy) @@ -591,7 +591,7 @@ # Forum messages: # message#1218 -> Link to message with id 1218 def parse_redmine_links(text, project, obj, attr, only_path, options) - text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(attachment|document|version|commit|source|export|message|project)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|\]|<|$)}) do |m| + text.gsub!(%r{([\s\(,\-\[\>]|^)(!)?(attachment|document|version|commit|source|export|message|project|user)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*?|"[^"]+?"))(?=(?=[[:punct:]]\W)|,|\s|\]|<|$)}) do |m| leading, esc, prefix, sep, identifier = $1, $2, $3, $5 || $7, $6 || $8 link = nil if esc.nil? @@ -634,6 +634,10 @@ if p = Project.visible.find_by_id(oid) link = link_to_project(p, {:only_path => only_path}, :class => 'project') end + when 'user' + if u = User.find_by_id(oid) + link = link_to_user(u) + end end elsif sep == ':' # removes the double quotes if any @@ -676,6 +680,10 @@ if p = Project.visible.find(:first, :conditions => ["identifier = :s OR LOWER(name) = :s", {:s => name.downcase}]) link = link_to_project(p, {:only_path => only_path}, :class => 'project') end + when 'user' + if u = User.find_by_login(name) + link = link_to_user(u) + end end end end