Skip to content
Snippets Groups Projects
Commit 112667a2 authored by Johannes Hörmann's avatar Johannes Hörmann
Browse files

fix Context_entity

parent a38dd659
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,16 @@ if (excludeContexts)
excludeContexts = JSON.parse(excludeContexts);
var filterContexts = !(vars.exists("$param.GetAllContexts_param") && vars.get("$param.GetAllContexts_param") == "true");
var useExclusives = vars.exists("$param.UseExclusives_param") && vars.get("$param.UseExclusives_param") == "true";
var whitelist = vars.exists("$param.Whitelist") && vars.get("$param.Whitelist") ? JSON.parse(vars.get("$param.Whitelist")) : undefined;
var whitelist;
if (vars.get("$local.idvalues") && vars.get("$local.idvalues").length > 0)
{
whitelist = vars.get("$local.idvalues")
}
else
{
whitelist = vars.get("$param.Whitelist") ? JSON.parse(vars.get("$param.Whitelist")) : undefined;
}
result.object(ContextUtils.getContexts(filterContexts, excludeContexts, useExclusives, whitelist));
\ No newline at end of file
......@@ -90,7 +90,8 @@ ContextUtils.getContextConsumer = function(pContextId)
* @param {Boolean} [pFilter=false] filter only for contexts which have a mapping in ContextUtils.getSelectMap
* @param {String[]} [pExclusiveContexts] contextIds that shall not be included (so this is a additional filter to the pFilter param)
* @param {Boolean} [pUseExclusives=false] decides whether the items in pExclusiveContexts are excluded (false) or
* everything that is not in pExclusiveContexts is excluded (true)
* everything that is NOT in pExclusiveContexts is excluded (true)
* (-> if it is a whitelist or blacklist)
* @param {String[]} [pWhitelist=undefined] only allowed contexts
*
* @return {String[][]} the contexts [[contextId, contextName, contextTitle], [... ], ...]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment