Pevents duplicate accesskeys (#12684).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11754 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-05-01 13:13:53 +00:00
parent e1d47931f1
commit 9d190c922a
1 changed files with 5 additions and 1 deletions

View File

@ -471,7 +471,11 @@ module ApplicationHelper
end end
def accesskey(s) def accesskey(s)
Redmine::AccessKeys.key_for s @used_accesskeys ||= []
key = Redmine::AccessKeys.key_for(s)
return nil if @used_accesskeys.include?(key)
@used_accesskeys << key
key
end end
# Formats text according to system settings. # Formats text according to system settings.