Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename template variables in the Account and Admin Toggle templates t…
…o not use underscores.
- Loading branch information
1 parent
6f4e341
commit f61e8fa
Showing
10 changed files
with
88 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
This is a running list of template changes made during upgrades. If you have copied the default | ||
templates, you will need to apply these changes manually to your copies. | ||
|
||
7.8.0 | ||
|
||
* Account Macro template variables renamed: | ||
account.url => account_url | ||
account.text => account_text | ||
|
||
* AdminToggle Macro template variables renamed: | ||
toggle.url => toggle_url | ||
toggle.text => toggle_text | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
share/upgrades/7.9.13-8.0.0/zzz_renameAccountMacroTemplateVariables.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
use WebGUI::Upgrade::Script; | ||
|
||
start_step "Rename Account Macro template variables"; | ||
|
||
my $sth = session->db->read( q|SELECT assetId, revisionDate FROM template where namespace="Macro/a_account"| ); | ||
ASSET: while ( my ($assetId, $revisionDate) = $sth->array ) { | ||
my $asset = eval { WebGUI::Asset->newById( session, $assetId, $revisionDate ); }; | ||
next ASSET if Exception::Class->caught; | ||
my $template = $asset->get('template'); | ||
$template =~ s/account\.url/account_url/msg; | ||
$template =~ s/account\.text/account_text/msg; | ||
$asset->update({ | ||
template => $template, | ||
}); | ||
} | ||
|
||
|
||
done; | ||
|
20 changes: 20 additions & 0 deletions
20
share/upgrades/7.9.13-8.0.0/zzz_renameAdminToggleMacroTemplateVariables.pl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
use WebGUI::Upgrade::Script; | ||
|
||
start_step "Rename AdminToggle Macro template variables"; | ||
|
||
my $sth = session->db->read( q|SELECT assetId, revisionDate FROM template where namespace="Macro/AdminToggle"| ); | ||
ASSET: while ( my ($assetId, $revisionDate) = $sth->array ) { | ||
my $asset = eval { WebGUI::Asset->newById( session, $assetId, $revisionDate ); }; | ||
next ASSET if Exception::Class->caught; | ||
my $template = $asset->get('template'); | ||
$template =~ s/toggle\.url/toggle_url/msg; | ||
$template =~ s/toggle\.text/toggle_text/msg; | ||
$asset->update({ | ||
template => $template, | ||
}); | ||
} | ||
|
||
|
||
done; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters