]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-1973 Fix bug in DB request
authorFabrice Bellingard <bellingard@gmail.com>
Tue, 26 Apr 2011 12:59:17 +0000 (14:59 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Tue, 26 Apr 2011 12:59:17 +0000 (14:59 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb

index 72893127e982c9b5c5c5b4da3af8a02a451ae1b9..910a52c55949f0369ffac60c92550528acebd31f 100644 (file)
@@ -175,14 +175,14 @@ class ResourceController < ApplicationController
     conditions='snapshot_id=?'
     values=[@snapshot.id]
     if params[:rule].blank?
-      conditions+='AND (switched_off IS NULL OR switched_off=?)'
+      conditions+=' AND (switched_off IS NULL OR switched_off=?)'
       values<<false
     else
       if params[:rule] == "f-positive"
-        conditions+='AND switched_off=?'
+        conditions+=' AND switched_off=?'
         values<<true
       else
-        conditions+='AND (switched_off IS NULL OR switched_off=?)'
+        conditions+=' AND (switched_off IS NULL OR switched_off=?)'
         values<<false
         severity=Sonar::RulePriority.id(params[:rule])
         if severity