Skip to content

Commit

Permalink
Enable to use this plugin without the CustomFieldsListing.
Browse files Browse the repository at this point in the history
  • Loading branch information
usualoma committed Dec 19, 2016
1 parent ed12650 commit 81dde79
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/FilteredObjects/config.yaml
@@ -1,6 +1,6 @@
id: FilteredObjects
name: FilteredObjects
version: 0.0.4
version: 0.0.5

description: <__trans phrase="Apply the filter to the MT tag.">
author_name: Taku AMANO
Expand Down
4 changes: 3 additions & 1 deletion plugins/FilteredObjects/lib/MT/Plugin/FilteredObjects.pm
Expand Up @@ -92,7 +92,9 @@ sub cms_init_app {
sub cms_init_request {
my ($eh, $app) = @_;

my $props = MT->component('CustomFieldsListing')->registry('list_properties') || {};
my $custom_fields_listing = MT->component('CustomFieldsListing')
or return;
my $props = $custom_fields_listing->registry('list_properties') || {};
for my $type (keys %$props) {
for my $p (values %{$props->{$type}}) {
next unless ref $p eq 'HASH';
Expand Down

0 comments on commit 81dde79

Please sign in to comment.