diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-05-01 13:13:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-05-01 13:13:53 +0000 |
commit | 9d190c922adbd3ee804a8fa4d0f85be96f649cd1 (patch) | |
tree | 199f377dc860550863becd3b32d22d420275e0d5 | |
parent | e1d47931f1879289369c69672c5846ef12062779 (diff) | |
download | redmine-9d190c922adbd3ee804a8fa4d0f85be96f649cd1.tar.gz redmine-9d190c922adbd3ee804a8fa4d0f85be96f649cd1.zip |
Pevents duplicate accesskeys (#12684).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11754 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/helpers/application_helper.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7c9aef059..148780df9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -471,7 +471,11 @@ module ApplicationHelper end 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 # Formats text according to system settings. |