Changeset 79 for CCLicense/trunk

Show
Ignore:
Timestamp:
06/13/05 01:15:15 (3 years ago)
Author:
ogawa
Message:

A fix for MT 3.16+

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • CCLicense/trunk/CCLicense.pl

    r77 r79  
    11# CCLicense Plugin for version-conscious CCLicense tags 
    22# 
    3 # Release 0.01 (Jun 08, 2005) 
     3# Release 0.02 (Jun 13, 2005) 
    44# 
    55# This software is provided as-is. You may use it for commercial or  
     
    1818    require MT::Plugin; 
    1919    my $plugin = new MT::Plugin(); 
    20     $plugin->name("CCLicense Plugin 0.01"); 
     20    $plugin->name("CCLicense Plugin 0.02"); 
    2121    $plugin->description("CCLicense tags for CCL version $CCL_VERSION" . 
    2222                         ($CCL_LANG ? "/$CCL_LANG" : "")); 
     
    3535    my $cc = $_[0] or return; 
    3636    my ($code, $cc_url, $cc_img_url) = $cc =~ /(\S+) (\S+) (\S+)/; 
    37     return $cc_url if $cc_url; 
     37    $cc = $code || $cc; 
    3838    $cc eq 'pd' ? 
    3939        "http://web.resource.org/cc/PublicDomain" : 
     
    4646    my $cc = $_[0]->stash('blog')->cc_license or return; 
    4747    my ($code, $cc_url, $cc_img_url) = $cc =~ /(\S+) (\S+) (\S+)/; 
    48     return $cc_img_url if $cc_img_url; 
     48    $cc = $code || $cc; 
    4949    "http://creativecommons.org/images/public/" . 
    5050        ($cc eq 'pd' ? 'norights.gif' :