Have 7.0.8 upgrade script fix the MIME type of the robots.txt snippet.
This commit is contained in:
parent
c438d55310
commit
3bf49188e9
2 changed files with 17 additions and 0 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
- structure: normalize signature of Asset::duplicate method
|
- structure: normalize signature of Asset::duplicate method
|
||||||
- fix: Copying Collaboration System assets fails
|
- fix: Copying Collaboration System assets fails
|
||||||
- fix: Collaboration System packages do not deploy
|
- fix: Collaboration System packages do not deploy
|
||||||
|
- fix: robots.txt returns wrong MIME type
|
||||||
|
|
||||||
7.0.7
|
7.0.7
|
||||||
- rfe: Image Management (funded by Formation Design Systems)
|
- rfe: Image Management (funded by Formation Design Systems)
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ my $quiet; # this line required
|
||||||
|
|
||||||
|
|
||||||
my $session = start(); # this line required
|
my $session = start(); # this line required
|
||||||
|
fixRobotsTxtMimeType($session);
|
||||||
|
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
|
|
||||||
|
|
@ -32,7 +33,22 @@ finish($session); # this line required
|
||||||
# # and here's our code
|
# # 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 ----
|
# ---- DO NOT EDIT BELOW THIS LINE ----
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue