From afb9efcddaa259cabe000d332bb616d1e1e62a7e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 25 Oct 2010 09:05:46 -0700 Subject: [PATCH] Change the URL for the Template Variable help template. Fixes bug #11922 --- docs/changelog/7.x.x.txt | 1 + docs/templates.txt | 4 ++++ docs/upgrades/upgrade_7.10.3-7.10.4.pl | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 26b9c9cd4..c167217b4 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -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 diff --git a/docs/templates.txt b/docs/templates.txt index 2c3253e27..1962dbe80 100644 --- a/docs/templates.txt +++ b/docs/templates.txt @@ -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 diff --git a/docs/upgrades/upgrade_7.10.3-7.10.4.pl b/docs/upgrades/upgrade_7.10.3-7.10.4.pl index bc166908d..247265ce7 100644 --- a/docs/upgrades/upgrade_7.10.3-7.10.4.pl +++ b/docs/upgrades/upgrade_7.10.3-7.10.4.pl @@ -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 --------------------------------