Change the URL for the Template Variable help template. Fixes bug #11922

This commit is contained in:
Colin Kuskie 2010-10-25 09:05:46 -07:00
parent 7b75a5c349
commit afb9efcdda
3 changed files with 27 additions and 0 deletions

View file

@ -1,6 +1,7 @@
7.10.4
- fixed #11920: Defaul DataForm emails missing entries.
- fixed #11921: DataForm emails contain 1 table per field
- fixed #11922: Help tempalte is squatting on a good URL
7.10.3
- fixed #11903: Unnecessary debug in Thingy

View file

@ -7,6 +7,10 @@ templates, you will need to apply these changes manually to your copies.
Do HTML escaping on field values. Move table tags outside of the loops so only one table
is generated.
* Template Variable template
The URL for that template has been changed from "help" to "root/import/adminconsole/help", making
the short URL Help available for WebGUI content use.
7.10.3
* Carousel Default Template - root/import/carousel/carousel-default

View file

@ -31,6 +31,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
changeTemplateHelpUrl($session);
finish($session); # this line required
@ -44,6 +45,27 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
#----------------------------------------------------------------------------
# Describe what our function does
sub changeTemplateHelpUrl {
my $session = shift;
print "\tChange the URL for the template that displays help variables... " unless $quiet;
# and here's our code
my $template = WebGUI::Asset->newByDynamicClass($session, 'PBtmplHelp000000000001');
if ($template) {
$template->update({url => 'root/import/adminconsole/help'});
my $rs = $template->session->db->read("select revisionDate from assetData where assetId=? and revisionDate<>?",[$template->getId, $template->get("revisionDate")]);
while (my ($version) = $rs->array) {
my $old = WebGUI::Asset->new($session, $template->getId, $template->get("className"), $version);
$old->purgeRevision if defined $old;
}
}
else {
print "\n\tNO TEMPLATE FOR DISPLAYING TEMPLATE VARIABLES...";
}
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------