]> source.dussan.org Git - sonarqube.git/commitdiff
Fix regression on /reviews/view/<id>
authorSimon Brandhof <simon.brandhof@gmail.com>
Mon, 3 Dec 2012 10:09:07 +0000 (11:09 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Mon, 3 Dec 2012 10:13:30 +0000 (11:13 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/reviews_controller.rb

index 166ddff32c5e158eeea89692cf01ee08bce100e7..1aa5479594ec22a14d2524e71f4647ac5d72678b 100644 (file)
@@ -30,10 +30,16 @@ class ReviewsController < ApplicationController
   def index
     init_params()
     search_reviews()
-    
+
     add_breadcrumbs message('sidebar.tools'), {:name => message('sidebar.tools.reviews'), :url => {:controller => 'reviews', :action => 'index'}}
   end
 
+  # Used for the "OLD" permalink "http://localhost:9000/reviews/view/1"
+  # => Since Sonar 2.13, permalinks are "http://localhost:9000/project_reviews/view/1" and are displayed in the context of the project
+  def view
+    redirect_to :controller => 'project_reviews', :action => 'view', :id => params[:id]
+  end
+
   # GET
   def screen
     @violation = RuleFailure.find params[:id]