Fix macro issues, missing FilePump, HASH entry. Fixes bug #11449.

This commit is contained in:
Colin Kuskie 2010-03-01 15:01:40 -08:00
parent c0d45e0f23
commit eea83d571e
2 changed files with 27 additions and 0 deletions

View file

@ -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

View file

@ -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 --------------------------------