summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorMary Umoh <umohm12@gmail.com>2017-08-08 23:12:08 +0200
committerDylan William Hardison <dylan@hardison.net>2017-08-08 23:12:08 +0200
commit63dd3061a164345095847e502bb5395bb5570c3a (patch)
tree3022c22ceb767f6e360d62124d558c2accf86a44 /Bugzilla/Install
parentc4db6d0065992417859f6b8db11e0fcad12051d5 (diff)
downloadbugzilla-63dd3061a164345095847e502bb5395bb5570c3a.tar.gz
bugzilla-63dd3061a164345095847e502bb5395bb5570c3a.tar.xz
Bug 1386336 - Generate robots.txt at checksetup.pl from a template
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/Filesystem.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index adc1815c1..3114d64be 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -214,11 +214,10 @@ sub FILESYSTEM {
'Bugzilla.pm' => { perms => CGI_READ },
"$localconfig*" => { perms => CGI_READ },
- 'META.*' => { perms => CGI_READ },
- 'MYMETA.*' => { perms => CGI_READ },
+ 'META.*' => { perms => CGI_READ },
+ 'MYMETA.*' => { perms => CGI_READ },
'bugzilla.dtd' => { perms => WS_SERVE },
'mod_perl.pl' => { perms => WS_SERVE },
- 'robots.txt' => { perms => WS_SERVE },
'.htaccess' => { perms => WS_SERVE },
'cvs-update.log' => { perms => WS_SERVE },
'scripts/sendunsentbugmail.pl' => { perms => WS_EXECUTE },
@@ -405,6 +404,9 @@ sub FILESYSTEM {
"skins/yui3.css" => { perms => CGI_READ,
overwrite => 1,
contents => $yui3_all_css },
+ "robots.txt" => { perms => CGI_READ,
+ overwrite => 1,
+ contents => \&robots_txt},
);
# Because checksetup controls the creation of index.html separately
@@ -952,6 +954,16 @@ sub _check_web_server_group {
return $group_id;
}
+sub robots_txt {
+ my $output = '';
+ my %vars;
+ Bugzilla::Hook::process("before_robots_txt", { vars => \%vars });
+ Bugzilla->template->process("robots.txt.tmpl", \%vars, \$output)
+ or die Bugzilla->template->error;
+ return $output;
+}
+
+
1;
__END__