[Rt-commit] r12185 - rt/branches/3.8-TESTING/lib/RT
ruz at bestpractical.com
ruz at bestpractical.com
Fri May 9 10:41:53 EDT 2008
Author: ruz
Date: Fri May 9 10:41:50 2008
New Revision: 12185
Modified:
rt/branches/3.8-TESTING/lib/RT/CachedGroupMember_Overlay.pm
rt/branches/3.8-TESTING/lib/RT/GroupMember_Overlay.pm
Log:
* don't create CGM records for short loop record. We create such records
for groups.
Modified: rt/branches/3.8-TESTING/lib/RT/CachedGroupMember_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/CachedGroupMember_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/CachedGroupMember_Overlay.pm Fri May 9 10:41:50 2008
@@ -149,6 +149,8 @@
}
}
+ return $id if $args{'Member'}->id == $args{'Group'}->id;
+
if ( $args{'Member'}->IsGroup() ) {
my $GroupMembers = $args{'Member'}->Object->MembersObj();
while ( my $member = $GroupMembers->Next() ) {
Modified: rt/branches/3.8-TESTING/lib/RT/GroupMember_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/GroupMember_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/GroupMember_Overlay.pm Fri May 9 10:41:50 2008
@@ -172,6 +172,14 @@
# find things which have the current group as a member.
# $group is an RT::Principal for the group.
$cgm->LimitToGroupsWithMember( $args{'Group'}->Id );
+ $cgm->Limit(
+ SUBCLAUSE => 'filter', # dont't mess up with prev condition
+ FIELD => 'MemberId',
+ OPERATOR => '!=',
+ VALUE => 'main.GroupId',
+ QUOTEVALUE => 0,
+ ENTRYAGGREGATOR => 'AND',
+ );
while ( my $parent_member = $cgm->Next ) {
my $parent_id = $parent_member->MemberId;
More information about the Rt-commit
mailing list