From a6509d658bdac48539ffb94ebef59201e31b656d Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Sat, 30 Dec 2023 04:47:38 +0000 Subject: [PATCH] Optimize repository menu visibility check (#39835). Patch by Holger Just (@hjust). git-svn-id: https://svn.redmine.org/redmine/trunk@22580 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/preparation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/redmine/preparation.rb b/lib/redmine/preparation.rb index c51ecfdb9..64333672a 100644 --- a/lib/redmine/preparation.rb +++ b/lib/redmine/preparation.rb @@ -367,7 +367,7 @@ module Redmine menu.push :repository, {:controller => 'repositories', :action => 'show', :repository_id => nil, :path => nil, :rev => nil}, - :if => Proc.new {|p| p.repositories.any? {|r| !r.new_record?}} + :if => Proc.new {|p| p.repositories.exists?} menu.push :settings, {:controller => 'projects', :action => 'settings'}, :last => true end -- 2.39.5