fix FAQ template anchors, sf#1356544

This commit is contained in:
Colin Kuskie 2005-12-06 17:28:42 +00:00
parent 95e7d5c891
commit 4c356dbab5
2 changed files with 13 additions and 0 deletions

View file

@ -13,6 +13,7 @@
may have caused problems in some people's databases. If it has all you
need to do to fix it is upgrade to this release and then run
sbin/rebuildLineage.pl
- fix [ 1356544 ] FAQ template in collaboration has wrong anchors
6.8.0
- Switched Date::Manip to DateTime for better performance and more

View file

@ -14,6 +14,7 @@ use Getopt::Long;
use WebGUI::Session;
use File::Path;
use WebGUI::SQL;
use WebGUI::Asset;
my $toVersion = "6.8.1"; # make this match what version you're going to
my $quiet; # this line required
@ -22,6 +23,7 @@ my $quiet; # this line required
start(); # this line required
upgradeRichEditor();
fixCSFaqTemplateAnchors();
finish(); # this line required
@ -32,6 +34,16 @@ sub upgradeRichEditor {
rmtree("../../www/extras/tinymce");
}
#-------------------------------------------------
sub fixCSFaqTemplateAnchors {
print "\tFix Anchors in the CS FAQ Template\n" unless ($quiet);
my $asset = WebGUI::Asset->new("PBtmpl0000000000000080","WebGUI::Asset::Template");
if (defined $asset) { ##Can't update what doesn't exist
my $template = $asset->get("template");
$template =~ s/(<a href="#)(<tmpl_var assetId>)/${1}id${2}/;
$asset->addRevision({template=>$template})->commit;
}
}
# ---- DO NOT EDIT BELOW THIS LINE ----