Have 7.0.8 upgrade script fix the MIME type of the robots.txt snippet.

This commit is contained in:
Drake 2006-09-23 01:43:51 +00:00
parent c438d55310
commit 3bf49188e9
2 changed files with 17 additions and 0 deletions

View file

@ -17,6 +17,7 @@
- structure: normalize signature of Asset::duplicate method
- fix: Copying Collaboration System assets fails
- fix: Collaboration System packages do not deploy
- fix: robots.txt returns wrong MIME type
7.0.7
- rfe: Image Management (funded by Formation Design Systems)

View file

@ -19,6 +19,7 @@ my $quiet; # this line required
my $session = start(); # this line required
fixRobotsTxtMimeType($session);
# upgrade functions go here
@ -32,7 +33,22 @@ finish($session); # this line required
# # and here's our code
#}
sub fixRobotsTxtMimeType {
my $session = shift;
print "\tFixing MIME type of robots.txt snippet.\n" unless $quiet;
my $asset = WebGUI::Asset->newByDynamicClass($session, 'pbrobot000000000000001');
unless (defined $asset) {
print "\t\tCouldn't find it; skipping this.\n";
return;
}
unless ($asset->isa('WebGUI::Asset::Snippet')) {
print "\t\tWrong asset class; skipping this.\n";
return;
}
$asset->update({mimeType => 'text/plain'});
}
# ---- DO NOT EDIT BELOW THIS LINE ----