summaryrefslogtreecommitdiffstats
path: root/extensions/SiteMapIndex
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/SiteMapIndex')
-rw-r--r--extensions/SiteMapIndex/Extension.pm10
-rw-r--r--extensions/SiteMapIndex/lib/Constants.pm4
-rw-r--r--extensions/SiteMapIndex/lib/Util.pm16
3 files changed, 15 insertions, 15 deletions
diff --git a/extensions/SiteMapIndex/Extension.pm b/extensions/SiteMapIndex/Extension.pm
index 901b80092..1e2010adb 100644
--- a/extensions/SiteMapIndex/Extension.pm
+++ b/extensions/SiteMapIndex/Extension.pm
@@ -101,21 +101,21 @@ sub install_filesystem {
my $recurse_dirs = $args->{'recurse_dirs'};
my $htaccess = $args->{'htaccess'};
- # Create the sitemap directory to store the index and sitemap files
+ # Create the sitemap directory to store the index and sitemap files
my $sitemap_path = bz_locations->{'datadir'} . "/" . __PACKAGE__->NAME;
$create_dirs->{$sitemap_path} = Bugzilla::Install::Filesystem::DIR_CGI_WRITE
| Bugzilla::Install::Filesystem::DIR_ALSO_WS_SERVE;
- $recurse_dirs->{$sitemap_path} = {
+ $recurse_dirs->{$sitemap_path} = {
files => Bugzilla::Install::Filesystem::CGI_WRITE
| Bugzilla::Install::Filesystem::DIR_ALSO_WS_SERVE,
- dirs => Bugzilla::Install::Filesystem::DIR_CGI_WRITE
- | Bugzilla::Install::Filesystem::DIR_ALSO_WS_SERVE
+ dirs => Bugzilla::Install::Filesystem::DIR_CGI_WRITE
+ | Bugzilla::Install::Filesystem::DIR_ALSO_WS_SERVE
};
# Create a htaccess file that allows the sitemap files to be served out
- $htaccess->{"$sitemap_path/.htaccess"} = {
+ $htaccess->{"$sitemap_path/.htaccess"} = {
perms => Bugzilla::Install::Filesystem::WS_SERVE,
contents => <<EOT
# Allow access to sitemap files created by the SiteMapIndex extension
diff --git a/extensions/SiteMapIndex/lib/Constants.pm b/extensions/SiteMapIndex/lib/Constants.pm
index 12f11597e..4f404c8b1 100644
--- a/extensions/SiteMapIndex/lib/Constants.pm
+++ b/extensions/SiteMapIndex/lib/Constants.pm
@@ -38,11 +38,11 @@ our @EXPORT = qw(
use constant SITEMAP_AGE => 12;
# This is the largest number of entries that can be in a single sitemap file,
-# per the sitemaps.org standard.
+# per the sitemaps.org standard.
use constant SITEMAP_MAX => 50_000;
# We only show bugs that are at least 12 hours old, because if somebody
-# files a bug that's a security bug but doesn't protect it, we want to give
+# files a bug that's a security bug but doesn't protect it, we want to give
# them time to fix that.
use constant SITEMAP_DELAY => 12;
diff --git a/extensions/SiteMapIndex/lib/Util.pm b/extensions/SiteMapIndex/lib/Util.pm
index 38fe1cf80..3548e5af5 100644
--- a/extensions/SiteMapIndex/lib/Util.pm
+++ b/extensions/SiteMapIndex/lib/Util.pm
@@ -28,7 +28,7 @@ use warnings;
use base qw(Exporter);
our @EXPORT = qw(
- generate_sitemap
+ generate_sitemap
bug_is_ok_to_index
);
@@ -98,7 +98,7 @@ sub generate_sitemap {
'SELECT bugs.bug_id, bugs.delta_ts
FROM bugs
LEFT JOIN bug_group_map ON bugs.bug_id = bug_group_map.bug_id
- WHERE bug_group_map.bug_id IS NULL AND creation_ts < ?
+ WHERE bug_group_map.bug_id IS NULL AND creation_ts < ?
' . $dbh->sql_limit($num_bugs, '?'));
my $filecount = 1;
@@ -122,7 +122,7 @@ sub generate_sitemap {
push(@$filelist, _generate_sitemap_file($extension_name, $filecount, $products, $bugs));
$filecount++;
- $offset += $num_bugs;
+ $offset += $num_bugs;
}
# Generate index file
@@ -131,7 +131,7 @@ sub generate_sitemap {
sub _generate_sitemap_index {
my ($extension_name, $filelist) = @_;
-
+
my $dbh = Bugzilla->dbh;
my $timestamp = $dbh->selectrow_array(
"SELECT " . $dbh->sql_date_format('NOW()', '%Y-%m-%d'));
@@ -181,7 +181,7 @@ END
<changefreq>daily</changefreq>
<priority>0.4</priority>
</url>
-";
+";
}
foreach my $bug (@$bugs) {
@@ -189,7 +189,7 @@ END
<url>
<loc>" . $bug_url . $bug->{bug_id} . "</loc>
<lastmod>" . datetime_from($bug->{delta_ts}, 'UTC')->iso8601 . 'Z' . "</lastmod>
- </url>
+ </url>
";
}
@@ -200,8 +200,8 @@ END
# Write the compressed sitemap data to a file in the cgi root so that they can
# be accessed by the search engines.
my $filename = "sitemap$filecount.xml.gz";
- gzip \$sitemap_xml => bz_locations->{'datadir'} . "/$extension_name/$filename"
- || die "gzip failed: $GzipError\n";
+ gzip \$sitemap_xml => bz_locations->{'datadir'} . "/$extension_name/$filename"
+ || die "gzip failed: $GzipError\n";
return $filename;
}