Skip to content

Commit

Permalink
Item8763: DelayMacroPlugin shows code error if you forget to give it …
Browse files Browse the repository at this point in the history
…a Macro text to delay

Now defaults to ''


git-svn-id: http://svn.foswiki.org/trunk/DelayMacroPlugin@6882 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
KennethLavrsen authored and KennethLavrsen committed Mar 24, 2010
1 parent 1a38f80 commit a0a16ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/System/DelayMacroPlugin.txt
Expand Up @@ -119,6 +119,7 @@ One line description, required for extensions repository catalog.
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change&nbsp;History: | <!-- versions below in reverse order -->&nbsp; |
| 24 Mar 2010 (1.1) | Fixed the code so it does not fail showing runtime errors if you forget to give it a macro text to delay. It now defaults to '' |
| 03 Mar 2010 (1.0) | Initial release |
| Home: | http://foswiki.org/Extensions/%TOPIC% |
| Support: | http://foswiki.org/Support/%TOPIC% |
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/DelayMacroPlugin.pm
Expand Up @@ -27,7 +27,7 @@ use Foswiki::Plugins (); # For the API version
our $VERSION = '$Rev: 5771 $';

# $RELEASE is used in the "Find More Extensions" automation in configure.
our $RELEASE = '1.0';
our $RELEASE = '1.1';

# Short description of this plugin
# One line description, is shown in the %SYSTEMWEB%.TextFormattingRules topic:
Expand Down Expand Up @@ -114,7 +114,7 @@ sub _delayMacro {
my $delay = defined $params->{delay} ? $params->{delay} : 1;
$delay = 1 unless $delay =~ /\d+/;
my $macro = $params->{macro} || 'SEARCH';
my $default = $params->{_DEFAULT};
my $default = defined $params->{_DEFAULT} ? $params->{_DEFAULT} : '';
my $result = '';

if ( $delay-- > 0 ) {
Expand Down

0 comments on commit a0a16ca

Please sign in to comment.