From 2cd8dbf549f72506543bc81dc10aef96cbd823bc Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Fri, 21 Dec 2012 09:41:56 +0100 Subject: [PATCH] Recent projects => fix regression (should not include LIBs) --- .../WEB-INF/app/views/layouts/_menu_projects.html.erb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb index 01545026f4b..8b4e7107476 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/layouts/_menu_projects.html.erb @@ -31,14 +31,12 @@ } <% - if @resource - # we keep only root resources in the "Recent Projects" - root_resource = @resource.root_project + if @resource && Project.root_qualifiers.include?(@resource.qualifier) %> else { - sonarRecentHistory.add('<%= root_resource.key -%>', - '<%= root_resource.name -%>', - '<%= Api::Utils.java_facade.getResourceType(root_resource.qualifier).getIconPath() -%>'); + sonarRecentHistory.add('<%= @resource.key -%>', + '<%= @resource.name -%>', + '<%= Api::Utils.java_facade.getResourceType(@resource.qualifier).getIconPath() -%>'); } <% end %> -- 2.39.5