- fix [ 1234051 ] Recursive loops in addGroupsToGroups

- Added handling for an exception in recurring payment processing where there
   was missing data causing a fatal error.
This commit is contained in:
JT Smith 2005-10-14 21:28:38 +00:00
parent 5fb251d01f
commit c7781bdd66
4 changed files with 18 additions and 7 deletions

View file

@ -29,6 +29,9 @@
- fix [ 1305132 ] 6.7.5 Assets are moved to trash by runHourly
- fix [ 1282473 ] RSS encoding (Thanks to Klaus Hertle)
- fix Removed last references to deprecated "lastUpdated"
- fix [ 1234051 ] Recursive loops in addGroupsToGroups
- Added handling for an exception in recurring payment processing where there
was missing data causing a fatal error.
6.7.6

View file

@ -535,7 +535,10 @@ sub getRecurringPaymentStatus {
);
my $transactionData = WebGUI::SQL->quickHashRef("select * from ITransact_recurringStatus where gatewayId=".quote($recurringId));
unless ($transactionData->{recipe}) { # if for some reason there's no transaction data, we shouldn't calc anything
WebGUI::ErrorHandler::error("For some reason recurring transaction $recurringId doesn't have any recurring status transaction data. This is most likely because you don't have the Recurring Postback URL set in your ITransact virtual terminal.");
return undef;
}
my $lastTerm = int(($transactionData->{lastTransaction} - $transactionData->{initDate}) / $resolve{$transactionData->{recipe}}) + 1;
# Process the response

View file

@ -81,6 +81,10 @@ sub addGroupsToGroups {
my $recursive = isIn($toGid, @{getGroupsInGroup($gid,1)});
unless ($isIn || $recursive) {
WebGUI::SQL->write("insert into groupGroupings (groupId,inGroup) values (".quote($gid).",".quote($toGid).")");
my $cache = WebGUI::Cache->new("groups_in_group_".$gid);
$cache->delete if (defined $cache);
$cache = WebGUI::Cache->new("groups_in_group_".$toGid);
$cache->delete if (defined $cache);
}
}
}

View file

@ -568,8 +568,7 @@ sub www_listGroups {
#-------------------------------------------------------------------
sub www_manageGroupsInGroup {
return WebGUI::Privilege::adminOnly() unless (WebGUI::Grouping::isInGroup(3) || _hasSecondaryPrivilege($session{form}{gid}));
my ($output, $p, $group, $groups, $f);
$f = WebGUI::HTMLForm->new;
my $f = WebGUI::HTMLForm->new;
$f->hidden(
-name => "op",
-value => "addGroupsToGroupSave"
@ -578,17 +577,19 @@ sub www_manageGroupsInGroup {
-name => "gid",
-value => $session{form}{gid}
);
$groups = WebGUI::Grouping::getGroupsInGroup($session{form}{gid},1);
push(@$groups,$session{form}{gid});
my @groups;
my $groupsIn = WebGUI::Grouping::getGroupsInGroup($session{form}{gid},1);
my $groupsFor = WebGUI::Grouping::getGroupsForGroup($session{form}{gid});
push(@groups, @$groupsIn,@$groupsFor,$session{form}{gid});
$f->group(
-name=>"groups",
-excludeGroups=>$groups,
-excludeGroups=>\@groups,
-label=>WebGUI::International::get(605),
-size=>5,
-multiple=>1
);
$f->submit;
$output .= $f->print;
my $output = $f->print;
$output .= '<p />';
$output .= walkGroups($session{form}{gid});
return _submenu($output,'813');