Changeset 107

Show
Ignore:
Timestamp:
07/14/05 20:42:13 (3 years ago)
Author:
ogawa
Message:

Several bug fixes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tagwire/trunk/README.txt

    r105 r107  
    375375 
    376376<$MTTag$> 
    377     Shows a tag. 
     377    Shows the tag. 
    378378 
    379379* Example: 
  • tagwire/trunk/tagwire.pl

    r105 r107  
    6060    } 
    6161    $data = $pd->data() || {}; 
    62     $refresh = 1 if !defined ${$data->{version}} || ${$data->{version}} ne $VERSION; 
     62    $refresh = 1 if !exists $data->{version} || ${$data->{version}} ne $VERSION; 
    6363    if ($refresh) { 
    6464        my $iter = MT::Entry->load_iter({ blog_id => $blog_id, 
     
    176176                                        key => $blog_id }); 
    177177        $data = $pd->data() if $pd; 
    178         return if ${$data->{version}} ne $VERSION; 
    179178    }; 
     179    return if !exists $data->{version} || ${$data->{version}} ne $VERSION; 
    180180    $r->cache($cname, $data) if $ENABLE_REQ_CACHE && $data; 
    181181    $data; 
     
    390390 
    391391sub tag { 
    392     $_[0]->stash('Tagwire::tag')
     392    $_[0]->stash('Tagwire::tag') || ''
    393393} 
    394394 
    395395sub tag_count { 
    396     $_[0]->stash('Tagwire::tag_count')
     396    $_[0]->stash('Tagwire::tag_count') || 0
    397397} 
    398398 
    399399sub tag_date { 
    400400    my ($ctx, $args) = @_; 
    401     $args->{ts} = $ctx->stash('Tagwire::tag_date'); 
     401    $args->{ts} = $ctx->stash('Tagwire::tag_date') 
     402        or return ''; 
    402403    MT::Template::Context::_hdlr_date($ctx, $args); 
    403404} 
    404405 
    405406sub tags_total { 
    406     $_[0]->stash('Tagwire::tags_total')
     407    $_[0]->stash('Tagwire::tags_total') || 0
    407408} 
    408409 
    409410sub tags_total_sum { 
    410     $_[0]->stash('Tagwire::tags_total_sum')
     411    $_[0]->stash('Tagwire::tags_total_sum') || 0
    411412} 
    412413