Changeset 2633
- Timestamp:
- 06/24/08 01:50:07 (20 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-40/lib/MT/Template/ContextHandlers.pm
r2613 r2633 15377 15377 } 15378 15378 15379 # FIXME: should this routine return an empty string? 15379 15380 sub _object_score_for { 15380 15381 my ($stash_key, $ctx, $args, $cond) = @_; … … 15387 15388 return $args->{default}; 15388 15389 } 15389 $score; 15390 15390 return $ctx->count_format($score, $args); 15391 15391 } 15392 15392 … … 15589 15589 } 15590 15590 15591 # FIXME: should this routine return an empty string? 15591 15592 sub _object_score_avg { 15592 15593 my ($stash_key, $ctx, $args, $cond) = @_; … … 15595 15596 my $object = $ctx->stash($stash_key); 15596 15597 return '' unless $object; 15597 return $object->score_avg($key); 15598 my $avg = $object->score_avg($key); 15599 return $ctx->count_format($avg, $args); 15598 15600 } 15599 15601
