[Rt-commit] r2512 - in rt/branches/3.4-RELEASE: . lib/RT
jesse at bestpractical.com
jesse at bestpractical.com
Sun Mar 27 00:20:20 EST 2005
Author: jesse
Date: Sun Mar 27 00:20:19 2005
New Revision: 2512
Modified:
rt/branches/3.4-RELEASE/ (props changed)
rt/branches/3.4-RELEASE/lib/RT/CachedGroupMember_Overlay.pm
Log:
r10207 at hualien: jesse | 2005-03-27 13:13:26 +0800
* Bugfixes to CachedGroupMember->SetDisabled unmasked by the RT::Record fixes
Modified: rt/branches/3.4-RELEASE/lib/RT/CachedGroupMember_Overlay.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/CachedGroupMember_Overlay.pm (original)
+++ rt/branches/3.4-RELEASE/lib/RT/CachedGroupMember_Overlay.pm Sun Mar 27 00:20:19 2005
@@ -242,11 +242,14 @@
sub SetDisabled {
my $self = shift;
my $val = shift;
-
+
+ # if it's already disabled, we're good.
+ return {1} if ($self->__Value('Disabled') == $val);
my $err = $self->SUPER::SetDisabled($val);
- unless ($err) {
- $RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $self->Id );
- return (undef);
+ my ($retval, $msg) = $err->as_array();
+ unless ($retval) {
+ $RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $self->Id .": $msg");
+ return ($err);
}
my $member = $self->MemberObj();
@@ -260,7 +263,7 @@
my $kid_err = $kid->SetDisabled($val );
unless ($kid_err) {
$RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $kid->Id );
- return (undef);
+ return ($kid_err);
}
}
}
More information about the Rt-commit
mailing list