[Rt-commit] r10837 - in rt/branches/3.7-RTIR-RELENG: .
ruz at bestpractical.com
ruz at bestpractical.com
Thu Feb 14 07:25:17 EST 2008
Author: ruz
Date: Thu Feb 14 07:25:17 2008
New Revision: 10837
Modified:
rt/branches/3.7-RTIR-RELENG/ (props changed)
rt/branches/3.7-RTIR-RELENG/lib/RT/GroupMember_Overlay.pm
rt/branches/3.7-RTIR-RELENG/lib/RT/Group_Overlay.pm
Log:
r10872 at localhost: cubic | 2008-02-14 15:19:13 +0300
* rollback transactions on errors
Modified: rt/branches/3.7-RTIR-RELENG/lib/RT/GroupMember_Overlay.pm
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/lib/RT/GroupMember_Overlay.pm (original)
+++ rt/branches/3.7-RTIR-RELENG/lib/RT/GroupMember_Overlay.pm Thu Feb 14 07:25:17 2008
@@ -133,10 +133,12 @@
my $member_object = $args{'Member'}->Object;
if ($member_object->HasMemberRecursively($args{'Group'})) {
$RT::Logger->debug("Adding that group would create a loop");
+ $RT::Handle->Rollback() unless ($args{'InsideTransaction'});
return(undef);
}
elsif ( $args{'Member'}->Id == $args{'Group'}->Id) {
$RT::Logger->debug("Can't add a group to itself");
+ $RT::Handle->Rollback() unless ($args{'InsideTransaction'});
return(undef);
}
}
Modified: rt/branches/3.7-RTIR-RELENG/lib/RT/Group_Overlay.pm
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/lib/RT/Group_Overlay.pm (original)
+++ rt/branches/3.7-RTIR-RELENG/lib/RT/Group_Overlay.pm Thu Feb 14 07:25:17 2008
@@ -416,6 +416,7 @@
);
my $id = $self->Id;
unless ($id) {
+ $RT::Handle->Rollback() unless ($args{'InsideTransaction'});
return ( 0, $self->loc('Could not create group') );
}
More information about the Rt-commit
mailing list