Commit faad1a96 authored by Bryan McLellan's avatar Bryan McLellan
Browse files

Merge branch 'CHEF-1163' into 0.9-stable

parents 8438c348 5d7759f7
......@@ -45,6 +45,14 @@ class Search < Application
params[:sort] ||= nil
params[:start] ||= 0
params[:rows] ||= 20
(k,v) = params[:q].split(":")
if k.nil? or v.nil?
raise BadRequest, "invalid q parameter"
elsif v == "*" and k != "*"
params[:q] = "#{k}:[* TO *]"
end
objects, start, total = query.search(params[:id], params[:q], params[:sort], params[:start], params[:rows])
display({
"rows" => objects,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment