From 5d47d4204bb990af1b394197bc6f9437153e191e Mon Sep 17 00:00:00 2001 From: Dan Wolfgang Date: Mon, 15 Sep 2014 11:27:09 -0400 Subject: [PATCH] Fixed a bug in the `...Entries` tag where entries wouldn't be identified depending upon which configuration options were used. --- addons/ConfigAssistant.pack/config.yaml | 2 +- addons/ConfigAssistant.pack/lib/ConfigAssistant/Plugin.pm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/ConfigAssistant.pack/config.yaml b/addons/ConfigAssistant.pack/config.yaml index d2da565..dfe147b 100644 --- a/addons/ConfigAssistant.pack/config.yaml +++ b/addons/ConfigAssistant.pack/config.yaml @@ -4,7 +4,7 @@ key: ConfigAssistant author_link: https://github.com/openmelody/mt-plugin-configassistant author_name: "Byrne Reese, Open Melody Software Group" description: This plugin provides a simple YAML based framework for creating plugin and theme configuration options. -version: 2.5.12 +version: 2.5.13 static_version: 20 schema_version: 4 diff --git a/addons/ConfigAssistant.pack/lib/ConfigAssistant/Plugin.pm b/addons/ConfigAssistant.pack/lib/ConfigAssistant/Plugin.pm index 28323a1..d62ada7 100644 --- a/addons/ConfigAssistant.pack/lib/ConfigAssistant/Plugin.pm +++ b/addons/ConfigAssistant.pack/lib/ConfigAssistant/Plugin.pm @@ -427,10 +427,10 @@ sub _hdlr_field_entry_loop { my $value = _get_field_value($ctx); # The value contains both active and inactive entries. We want the - # active ones, because the inactive ones aren't supposed to get + # active ones, because the inactive ones aren't supposed to get # published. The format is, for example: `active:1,2,5;inactive:3,4,6` - ( my $active_ids = $value ) =~ s{active:(.*);inactive.*}{$1}; - my @ids = grep { /^\d+$/ } split( ',', $active_ids ); + ( my $active_ids = $value ) =~ s{active:([\d,]*)(;)?(inactive.*)?}{$1}; + my @ids = grep { /\d+/ } split( ',', $active_ids ); # There are no entries selected. unless ( @ids ) {