]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3919 The "Bulk Deletion" page shouldn't use '%' in the ResourceIndex DB request
authorFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Thu, 22 Nov 2012 14:36:31 +0000 (15:36 +0100)
committerFabrice Bellingard <fabrice.bellingard@sonarsource.com>
Thu, 22 Nov 2012 14:37:18 +0000 (15:37 +0100)
sonar-server/src/main/webapp/WEB-INF/app/controllers/bulk_deletion_controller.rb

index a501282f0efdd275f3791acd940dfe35b6984f73..9cac2bb2a8732bc944f497f35467a6f58c58a686 100644 (file)
@@ -41,9 +41,9 @@ class BulkDeletionController < ApplicationController
       # Search for resources
       conditions = "qualifier=:qualifier"
       values = {:qualifier => @selected_tab}
-      if params[:name_filter]
+      if params[:name_filter] && !params[:name_filter].blank?
         conditions += " AND kee LIKE :kee"
-        values[:kee] = '%' + params[:name_filter].strip.downcase + '%'
+        values[:kee] = params[:name_filter].strip.downcase + '%'
       end
       
       resource_ids = ResourceIndex.find(:all,