Show
Ignore:
Timestamp:
09/16/06 12:44:59 (2 years ago)
Author:
ogawa
Message:

Now be compatible with MT 3.3x.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • EntryCategoryEntries/trunk/EntryCategoryEntries.pl

    r154 r243  
    1313use base 'MT::Plugin'; 
    1414use vars qw($VERSION); 
    15 $VERSION = '0.01'; 
     15$VERSION = '0.02'; 
    1616 
    1717use MT; 
     
    2222    name => 'Entry Category Entries', 
    2323    description => "A plugin for listing entries included in the primary category of the current entry", 
    24     doc_link => 'http://as-is.net/hacks/2005/10/entry_category_entries_plugin.html', 
     24    doc_link => 'http://code.as-is.net/wiki/EntryCategoryEntries_Plugin', 
    2525    author_name => 'Hirotaka Ogawa', 
    2626    author_link => 'http://profile.typekey.com/ogawa/', 
     
    3535        or return $ctx->_no_entry_error('MT' . $ctx->stash('tag')); 
    3636    my $cat = $entry->category or return ''; 
    37     $args->{category} = ['OR', $cat]; 
     37    $args->{category} = MT->version_number > 3.2 ? ['OR',[$cat]] : ['OR',$cat]; 
    3838    MT::Template::Context::_hdlr_entries(@_); 
    3939}