Index: lib/redmine/menu_manager.rb
===================================================================
--- lib/redmine/menu_manager.rb	(revision 2034)
+++ lib/redmine/menu_manager.rb	(working copy)
@@ -91,10 +91,11 @@
             end
             caption = item.caption(project)
             caption = l(caption) if caption.is_a?(Symbol)
+            #warning: this "==" is re-defined in "MenuItem" class
             if block_given?
-              yield item, caption, url, (current_menu_item == item.name)
+              yield item, caption, url, (item == current_menu_item)
             else
-              items << [item, caption, url, (current_menu_item == item.name)]
+              items << [item, caption, url, (item == current_menu_item)]
             end
           end
         end
@@ -179,8 +180,13 @@
         @param = options[:param] || :id
         @caption = options[:caption]
         @html_options = options[:html] || {}
+        @for = options[:for] || []
       end
       
+      def ==(other)
+        @for.blank? ? @name == other : @for.include?(other.to_sym)
+      end
+
       def caption(project=nil)
         if @caption.is_a?(Proc)
           c = @caption.call(project).to_s
