From 334bead74bc9c5e819f14946726eaad40986d636 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Sat, 16 Dec 2017 13:17:05 -0600 Subject: Bug 1403777 - Migrate urlbase from params to localconfig --- Bugzilla/Template.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Bugzilla/Template.pm') diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index 49b7e9435..206f2f3cb 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -191,9 +191,7 @@ sub quoteUrls { } # Provide tooltips for full bug links (Bug 74355) - my $urlbase_re = '(' . join('|', - map { qr/$_/ } grep($_, Bugzilla->params->{'urlbase'}, - Bugzilla->params->{'sslbase'})) . ')'; + my $urlbase_re = quotemeta(Bugzilla->localconfig->{urlbase}); $text =~ s~\b(${urlbase_re}\Qshow_bug.cgi?id=\E([0-9]+)(\#c([0-9]+))?)\b ~($things[$count++] = $bug_link_func->($3, $1, { comment_num => $5, user => $user })) && ("\x{FDD2}" . ($count-1) . "\x{FDD3}") @@ -1036,7 +1034,7 @@ sub create { 'sudoer' => sub { return Bugzilla->sudoer; }, # Allow templates to access the "corect" URLBase value - 'urlbase' => sub { return Bugzilla::Util::correct_urlbase(); }, + 'urlbase' => sub { return Bugzilla->localconfig->{urlbase}; }, # Allow templates to access docs url with users' preferred language 'docs_urlbase' => sub { -- cgit v1.2.3-24-g4f1b