Implement support for filter_vars

fixes #9940
This commit is contained in:
Gunnar Beutner 2015-08-18 06:47:07 +02:00
parent 7fc7cde6a1
commit 147f69a8f6
1 changed files with 8 additions and 0 deletions

View File

@ -118,6 +118,14 @@ std::vector<ConfigObject::Ptr> FilterUtility::GetFilterTargets(const QueryDescri
ScriptFrame frame;
frame.Sandboxed = true;
Dictionary::Ptr filter_vars = query->Get("filter_vars");
if (filter_vars) {
ObjectLock olock(filter_vars);
BOOST_FOREACH(const Dictionary::Pair& kv, filter_vars) {
frame.Locals->Set(kv.first, kv.second);
}
}
String varName = utype->GetName();
boost::algorithm::to_lower(varName);