Add support for implicit 'true' filter when filter parameter is missing

refs #9077
This commit is contained in:
Gunnar Beutner 2015-07-28 14:33:09 +02:00
parent 890694e629
commit 15e5dbd151
1 changed files with 4 additions and 0 deletions

View File

@ -42,10 +42,14 @@ bool StatusQueryHandler::HandleRequest(const ApiUser::Ptr& user, HttpRequest& re
Dictionary::Ptr params = HttpUtility::FetchRequestParameters(request);
params->Set("type", type->GetName());
if (request.RequestUrl->GetPath().size() > 1) {
String attr = type->GetName();
boost::algorithm::to_lower(attr);
params->Set(attr, request.RequestUrl->GetPath()[1]);
} else if (!params->Contains("filter")) {
params->Set("filter", "true");
}
std::vector<DynamicObject::Ptr> objs = FilterUtility::GetFilterTargets(qd, params);