From eea83d571e6a5b28f5a3ece88c027f378fc7a944 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 1 Mar 2010 15:01:40 -0800 Subject: [PATCH] Fix macro issues, missing FilePump, HASH entry. Fixes bug #11449. --- docs/changelog/7.x.x.txt | 1 + docs/upgrades/upgrade_7.8.13-7.9.0.pl | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 977ed7006..958d86500 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -3,6 +3,7 @@ - fixed #11445: NotifyAboutUsers sends infinite e-mails - fixed #11446: Delete a wiki - fixed #11401: Remove hacks in Asset::Wobject::Weather + - fixed #11449: List of macros in my config file has HASH(0x45223ab3) entry 7.8.13 - fixed #11418: confusing typ-o in gotcha diff --git a/docs/upgrades/upgrade_7.8.13-7.9.0.pl b/docs/upgrades/upgrade_7.8.13-7.9.0.pl index abfe58758..006bed776 100644 --- a/docs/upgrades/upgrade_7.8.13-7.9.0.pl +++ b/docs/upgrades/upgrade_7.8.13-7.9.0.pl @@ -31,6 +31,8 @@ my $quiet; my $session = start(); # upgrade functions go here +removeBadMacroEntries($session); +addFilePumpMacro($session); finish($session); @@ -44,6 +46,30 @@ finish($session); # print "DONE!\n" unless $quiet; #} +#---------------------------------------------------------------------------- +# Describe what our function does +sub removeBadMacroEntries { + my $session = shift; + print "\tRemove bad macro entries that look like perl memory locations... " unless $quiet; + my $macros = $session->config->get('macros'); + # and here's our code + foreach my $macroName (keys %{ $macros }) { + delete $macros->{$macroName} if $macroName =~ /HASH \( 0x \w+ \)/ox; + } + $session->config->set('macros', $macros); + print "DONE!\n" unless $quiet; +} + +#---------------------------------------------------------------------------- +# Describe what our function does +sub addFilePumpMacro { + my $session = shift; + print "\tAdd the FilePump macro... " unless $quiet; + # and here's our code + $session->config->addToHash('macros', 'FilePump' => 'FilePump'); + print "DONE!\n" unless $quiet; +} + # -------------- DO NOT EDIT BELOW THIS LINE --------------------------------