diff options
author | mkanat%bugzilla.org <> | 2006-06-30 01:49:55 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2006-06-30 01:49:55 +0200 |
commit | a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2 (patch) | |
tree | c69b87d1aba4ed1d77ec33abdaccafe249bd735b /Bugzilla/Attachment.pm | |
parent | 38b17a8f16b21bb3dae4f1e6c01c84a5adc5d38f (diff) | |
download | bugzilla-a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2.tar.gz bugzilla-a0196b5d1ed38b7bf7f0783c1c865d6642f2e2b2.tar.xz |
Bug 342121: Remove usage of Config qw(:locations) in favor of Constants::bz_locations()
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave
Diffstat (limited to 'Bugzilla/Attachment.pm')
-rw-r--r-- | Bugzilla/Attachment.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Attachment.pm b/Bugzilla/Attachment.pm index a7961d764..78d326049 100644 --- a/Bugzilla/Attachment.pm +++ b/Bugzilla/Attachment.pm @@ -47,9 +47,10 @@ that users upload to the Bugzilla server. =cut +use Bugzilla::Constants; use Bugzilla::Error; use Bugzilla::Flag; -use Bugzilla::Config qw(:locations Param); +use Bugzilla::Config; use Bugzilla::User; use Bugzilla::Util qw(trick_taint); @@ -384,7 +385,7 @@ sub _get_local_filename { my $self = shift; my $hash = ($self->id % 100) + 100; $hash =~ s/.*(\d\d)$/group.$1/; - return "$attachdir/$hash/attachment." . $self->id; + return bz_locations()->{'attachdir'} . "/$hash/attachment." . $self->id; } sub _validate_filename { @@ -700,6 +701,7 @@ sub insert_attachment_for_bug { # If the file is to be stored locally, stream the file from the webserver # to the local file without reading it into a local variable. if ($cgi->param('bigfile')) { + my $attachdir = bz_locations()->{'attachdir'}; my $fh = $cgi->upload('data'); my $hash = ($attachid % 100) + 100; $hash =~ s/.*(\d\d)$/group.$1/; |