diff options
Diffstat (limited to 'Attachment.pm')
-rw-r--r-- | Attachment.pm | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/Attachment.pm b/Attachment.pm index 7416fd589..23e634276 100644 --- a/Attachment.pm +++ b/Attachment.pm @@ -27,16 +27,8 @@ use diagnostics; use strict; -use vars qw( - $template - $vars -); - package Attachment; -my $template = $::template; -my $vars = $::vars; - # This module requires that its caller have said "require CGI.pl" to import # relevant functions from that script and its companion globals.pl. @@ -44,11 +36,11 @@ my $vars = $::vars; # Functions ############################################################################ -sub list +sub query { - # Displays a table of attachments for a given bug along with links for - # viewing, editing, or making requests for each attachment. - + # Retrieves and returns an array of attachment records for a given bug. + # This data should be given to attachment/list.atml in an + # "attachments" variable. my ($bugid) = @_; my $in_editbugs = &::UserInGroup("editbugs"); @@ -98,14 +90,8 @@ sub list $in_editbugs); push @attachments, \%a; } - - $vars->{'bugid'} = $bugid; - $vars->{'attachments'} = \@attachments; - - $template->process("attachment/list.atml", $vars) - || &::DisplayError("Template process failed: " . $template->error()) - && exit; - + + return \@attachments; } 1; |