Commit a08a509cb2be581176a88bddcbd1631f39bdd6aa

Authored by Victor Costa
2 parents bd48c156 f4c6569d

Merge branch 'hotfixes' into stable

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/controllers/box_organizer_controller.rb
@@ -84,9 +84,9 @@ class BoxOrganizerController < ApplicationController @@ -84,9 +84,9 @@ class BoxOrganizerController < ApplicationController
84 if request.xhr? and params[:query] 84 if request.xhr? and params[:query]
85 search = params[:query] 85 search = params[:query]
86 path_list = if boxes_holder.is_a?(Environment) && boxes_holder.enabled?('use_portal_community') && boxes_holder.portal_community 86 path_list = if boxes_holder.is_a?(Environment) && boxes_holder.enabled?('use_portal_community') && boxes_holder.portal_community
87 - boxes_holder.portal_community.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path } 87 + boxes_holder.portal_community.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{portal}/"+content.path }
88 elsif boxes_holder.is_a?(Profile) 88 elsif boxes_holder.is_a?(Profile)
89 - boxes_holder.articles.find(:all, :conditions=>"name ILIKE '%#{search}%' or path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path } 89 + boxes_holder.articles.find(:all, :conditions=>"articles.name ILIKE '%#{search}%' or articles.path ILIKE '%#{search}%'", :limit=>20).map { |content| "/{profile}/"+content.path }
90 else 90 else
91 [] 91 []
92 end 92 end