summaryrefslogtreecommitdiffstats
path: root/extensions/SiteMapIndex
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 /extensions/SiteMapIndex
parent49e0df0d4e1b2f25be4ab36660dac5e47768c9a1 (diff)
downloadbugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.gz
bugzilla-334bead74bc9c5e819f14946726eaad40986d636.tar.xz
Bug 1403777 - Migrate urlbase from params to localconfig
Diffstat (limited to 'extensions/SiteMapIndex')
-rw-r--r--extensions/SiteMapIndex/Extension.pm8
-rw-r--r--extensions/SiteMapIndex/lib/Util.pm8
2 files changed, 8 insertions, 8 deletions
diff --git a/extensions/SiteMapIndex/Extension.pm b/extensions/SiteMapIndex/Extension.pm
index a3f093485..3d4342e0e 100644
--- a/extensions/SiteMapIndex/Extension.pm
+++ b/extensions/SiteMapIndex/Extension.pm
@@ -31,7 +31,7 @@ use base qw(Bugzilla::Extension);
our $VERSION = '1.0';
use Bugzilla::Constants qw(bz_locations ON_WINDOWS);
-use Bugzilla::Util qw(correct_urlbase get_text);
+use Bugzilla::Util qw(get_text);
use Bugzilla::Install::Filesystem;
use Bugzilla::Extension::SiteMapIndex::Constants;
@@ -80,7 +80,7 @@ sub page_before_template {
sub install_before_final_checks {
my ($self) = @_;
- if (!correct_urlbase()) {
+ if (!Bugzilla->localconfig->{urlbase}) {
print STDERR get_text('sitemap_no_urlbase'), "\n";
return;
}
@@ -89,7 +89,7 @@ sub install_before_final_checks {
return;
}
- return if (correct_urlbase() ne 'https://bugzilla.mozilla.org/');
+ return if (Bugzilla->localconfig->{urlbase} ne 'https://bugzilla.mozilla.org/');
}
sub install_filesystem {
@@ -126,7 +126,7 @@ EOT
sub before_robots_txt {
my ($self, $args) = @_;
- $args->{vars}{SITEMAP_URL} = correct_urlbase() . SITEMAP_URL;
+ $args->{vars}{SITEMAP_URL} = Bugzilla->localconfig->{urlbase} . SITEMAP_URL;
}
__PACKAGE__->NAME;
diff --git a/extensions/SiteMapIndex/lib/Util.pm b/extensions/SiteMapIndex/lib/Util.pm
index 3548e5af5..4519461b4 100644
--- a/extensions/SiteMapIndex/lib/Util.pm
+++ b/extensions/SiteMapIndex/lib/Util.pm
@@ -34,7 +34,7 @@ our @EXPORT = qw(
use Bugzilla::Extension::SiteMapIndex::Constants;
-use Bugzilla::Util qw(correct_urlbase datetime_from url_quote);
+use Bugzilla::Util qw(datetime_from url_quote);
use Bugzilla::Constants qw(bz_locations);
use Scalar::Util qw(blessed);
@@ -144,7 +144,7 @@ END
foreach my $filename (@$filelist) {
$index_xml .= "
<sitemap>
- <loc>" . correct_urlbase() . "data/$extension_name/$filename</loc>
+ <loc>" . Bugzilla->localconfig->{urlbase} . "data/$extension_name/$filename</loc>
<lastmod>$timestamp</lastmod>
</sitemap>
";
@@ -166,8 +166,8 @@ END
sub _generate_sitemap_file {
my ($extension_name, $filecount, $products, $bugs) = @_;
- my $bug_url = correct_urlbase() . 'show_bug.cgi?id=';
- my $product_url = correct_urlbase() . 'describecomponents.cgi?product=';
+ my $bug_url = Bugzilla->localconfig->{urlbase} . 'show_bug.cgi?id=';
+ my $product_url = Bugzilla->localconfig->{urlbase} . 'describecomponents.cgi?product=';
my $sitemap_xml = <<END;
<?xml version="1.0" encoding="UTF-8"?>