Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
civirules
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ayduns
civirules
Commits
5bf8e8fa
Commit
5bf8e8fa
authored
5 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Also check smartgroups for 'Contact in group' condition
parent
f6a64b2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/CivirulesConditions/Utils/GroupContact.php
+16
-1
16 additions, 1 deletion
CRM/CivirulesConditions/Utils/GroupContact.php
with
16 additions
and
1 deletion
CRM/CivirulesConditions/Utils/GroupContact.php
+
16
−
1
View file @
5bf8e8fa
...
...
@@ -31,7 +31,22 @@ class CRM_CivirulesConditions_Utils_GroupContact {
if
(
$groupContactCount
>
0
)
{
return
TRUE
;
}
// @fixme We really need a "is in smartgroup" API!!
// If the groups are smartgroups (saved searches) they may be out of date.
// This triggers a check (and rebuild if necessary).
\CRM_Contact_BAO_GroupContactCache
::
check
(
$group_id
);
$query
=
"SELECT id FROM `civicrm_group_contact_cache` WHERE group_id=%1 AND contact_id=%2"
;
$queryParams
=
[
1
=>
[
$group_id
,
'Positive'
],
2
=>
[
$contact_id
,
'Positive'
],
];
if
(
CRM_Core_DAO
::
singleValueQuery
(
$query
,
$queryParams
,
FALSE
))
{
return
TRUE
;
}
return
FALSE
;
}
}
\ No newline at end of file
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment