The details pages have no way to pass the master columns to the collection used to retrieve the Item to display: what they would need instead is a master object. So they don't even try to retrieve the master column values from the parameters (see *Param() in the FormPage and ItemPage classes). Fortunately so far there is no case where we need this functionality.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- .../lib/ObjectModel/CGI/CollectionBlock.pm | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm index e8156a1bf..7d42ba2c2 100644 --- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm +++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm @@ -240,15 +240,6 @@ sub GetDetailsLink($$) if (!$Row->{DetailsLink}) { $Row->{DetailsLink} = "$Row->{DetailsPage}?Key=". uri_escape($Row->{Item}->GetKey()); - my ($MasterColNames, $MasterColValues) = $Row->{Item}->GetMasterCols(); - if (defined $MasterColNames) - { - foreach my $ColIndex (0..$#{$MasterColNames}) - { - $Row->{DetailsLink} .= "&". $MasterColNames->[$ColIndex] ."=". - uri_escape($MasterColValues->[$ColIndex]); - } - } } return $Row->{DetailsLink}; } @@ -680,17 +671,7 @@ sub OnAction($$)
if ($self->{RW} and $Action eq $self->GetAddButtonLabel()) { - my $Target = $self->GetDetailsPage(); - my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols(); - if (defined($MasterColNames)) - { - foreach my $ColIndex (0..$#{$MasterColNames}) - { - $Target .= ($ColIndex == 0 ? "?" : "&") . $MasterColNames->[$ColIndex] . - "=" . uri_escape($MasterColValues->[$ColIndex]); - } - } - exit($self->{EnclosingPage}->Redirect($Target)); + exit($self->{EnclosingPage}->Redirect($self->GetDetailsPage())); }
foreach my $Key (@{$self->{Collection}->GetKeys()})