From 9d190c922adbd3ee804a8fa4d0f85be96f649cd1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 1 May 2013 13:13:53 +0000 Subject: Pevents duplicate accesskeys (#12684). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11754 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/application_helper.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3