From: Gunnar Beutner Date: Sat, 7 Nov 2015 09:01:07 +0000 (+0100) Subject: Rename 'object' to 'obj' in filters X-Git-Tag: v2.4.0~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b89a7dbdb64843f3dbf17994f9bc965d77025ae6;p=icinga2 Rename 'object' to 'obj' in filters refs #9077 --- diff --git a/doc/9-icinga2-api.md b/doc/9-icinga2-api.md index 5b770089b..9aa6f0764 100644 --- a/doc/9-icinga2-api.md +++ b/doc/9-icinga2-api.md @@ -274,7 +274,7 @@ For example when querying objects of type `Host` the variable in the filter expr `host`. Additionally related objects such as the host's check command are also made available (e.g., via the `check_command` variable). -The object is also made available via the `object` variable. This makes it easier to build +The object is also made available via the `obj` variable. This makes it easier to build filters which can be used for more than one object type (e.g., for permissions). > **Note** diff --git a/lib/remote/filterutility.cpp b/lib/remote/filterutility.cpp index a0e51f851..aa5e6417b 100644 --- a/lib/remote/filterutility.cpp +++ b/lib/remote/filterutility.cpp @@ -112,7 +112,7 @@ bool FilterUtility::EvaluateFilter(ScriptFrame& frame, Expression *filter, } else vars = frame.Self; - vars->Set("object", target); + vars->Set("obj", target); vars->Set(varName, target); for (int fid = 0; fid < type->GetFieldCount(); fid++) {