summaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2017-12-16 20:17:05 +0100
committerGitHub <noreply@github.com>2017-12-16 20:17:05 +0100
commit334bead74bc9c5e819f14946726eaad40986d636 (patch)
treee7ecf8d4eba2e6a046da8a9dc8828f35b75c7428 /attachment.cgi
parent49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff)
downloadbugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz
bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi8
1 files changed, 4 insertions, 4 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 432ce8914..d1523d248 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -61,7 +61,7 @@ if (Bugzilla->params->{disable_bug_updates} && $cgi->request_method eq 'POST') {
'Bug updates are currently disabled.');
}
-# You must use the appropriate urlbase/sslbase param when doing anything
+# You must use the appropriate urlbase param when doing anything
# but viewing an attachment, or a raw diff.
if ($action ne 'view'
&& (($action !~ /^(?:interdiff|diff)$/) || $format ne 'raw'))
@@ -267,7 +267,7 @@ sub get_attachment {
}
unless ($userid && $valid_token) {
# Not a valid token.
- print $cgi->redirect('-location' => correct_urlbase() . $path);
+ print $cgi->redirect('-location' => Bugzilla->localconfig->{urlbase} . $path);
exit;
}
# Change current user without creating cookies.
@@ -287,7 +287,7 @@ sub get_attachment {
# make sure we were not going to request credentials on the
# alternate host.
Bugzilla->login();
- my $attachbase = Bugzilla->params->{'attachment_base'};
+ my $attachbase = Bugzilla->localconfig->{'attachment_base'};
# Replace %bugid% by the ID of the bug the attachment
# belongs to, if present.
$attachbase =~ s/\%bugid\%/$bug_id/;
@@ -377,7 +377,7 @@ sub view {
Bugzilla::Hook::process('attachment_should_redirect_login', { do_redirect => \$do_redirect });
if ($do_redirect) {
- my $uri = URI->new(correct_urlbase() . 'attachment.cgi');
+ my $uri = URI->new(Bugzilla->localconfig->{urlbase} . 'attachment.cgi');
$uri->query_param(id => $attachment->id);
$uri->query_param(content_type => $contenttype) if $contenttype_override;