Changeset 107
- Timestamp:
- 07/14/05 20:42:13 (3 years ago)
- Files:
-
- tagwire/trunk/README.txt (modified) (1 diff)
- tagwire/trunk/tagwire.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tagwire/trunk/README.txt
r105 r107 375 375 376 376 <$MTTag$> 377 Shows atag.377 Shows the tag. 378 378 379 379 * Example: tagwire/trunk/tagwire.pl
r105 r107 60 60 } 61 61 $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; 63 63 if ($refresh) { 64 64 my $iter = MT::Entry->load_iter({ blog_id => $blog_id, … … 176 176 key => $blog_id }); 177 177 $data = $pd->data() if $pd; 178 return if ${$data->{version}} ne $VERSION;179 178 }; 179 return if !exists $data->{version} || ${$data->{version}} ne $VERSION; 180 180 $r->cache($cname, $data) if $ENABLE_REQ_CACHE && $data; 181 181 $data; … … 390 390 391 391 sub tag { 392 $_[0]->stash('Tagwire::tag') ;392 $_[0]->stash('Tagwire::tag') || ''; 393 393 } 394 394 395 395 sub tag_count { 396 $_[0]->stash('Tagwire::tag_count') ;396 $_[0]->stash('Tagwire::tag_count') || 0; 397 397 } 398 398 399 399 sub tag_date { 400 400 my ($ctx, $args) = @_; 401 $args->{ts} = $ctx->stash('Tagwire::tag_date'); 401 $args->{ts} = $ctx->stash('Tagwire::tag_date') 402 or return ''; 402 403 MT::Template::Context::_hdlr_date($ctx, $args); 403 404 } 404 405 405 406 sub tags_total { 406 $_[0]->stash('Tagwire::tags_total') ;407 $_[0]->stash('Tagwire::tags_total') || 0; 407 408 } 408 409 409 410 sub tags_total_sum { 410 $_[0]->stash('Tagwire::tags_total_sum') ;411 $_[0]->stash('Tagwire::tags_total_sum') || 0; 411 412 } 412 413
