From: David Gageot Date: Thu, 24 May 2012 15:35:02 +0000 (+0200) Subject: Fix ordering of dashboard that a user created X-Git-Tag: 3.1~74 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ae0b1420135b577d1f3f29e6a089de77a370623a;p=sonarqube.git Fix ordering of dashboard that a user created --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index 66c8ba7a15b..3d2d0a4d6a0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -152,7 +152,7 @@ class DashboardsController < ApplicationController private def position(offset) - dashboard=Dashboard.find(:first, :conditions => ['shared=? and id=? and (user_id is null or user_id<>?)', true, params[:id].to_i, current_user.id]) + dashboard=Dashboard.find(params[:id].to_i) if dashboard add_default_dashboards_if_first_user_dashboard(dashboard.global?)