summaryrefslogtreecommitdiffstats
path: root/Attachment.pm
diff options
context:
space:
mode:
authorgerv%gerv.net <>2002-03-24 02:58:36 +0100
committergerv%gerv.net <>2002-03-24 02:58:36 +0100
commitfc6aa3c91fdcb1d9f11d05d9f13d1da8fce15b45 (patch)
tree5963cb8904490359bd8cfe5b7ca641edc54c2ff9 /Attachment.pm
parent90713bc2165496a5299f9fda1549bb9e91a6fecb (diff)
downloadbugzilla-fc6aa3c91fdcb1d9f11d05d9f13d1da8fce15b45.tar.gz
bugzilla-fc6aa3c91fdcb1d9f11d05d9f13d1da8fce15b45.tar.xz
Bug 110012 - show_bug templatisation. r=bbaetz, afranke.
Diffstat (limited to 'Attachment.pm')
-rw-r--r--Attachment.pm26
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;