Changeset 2400

Show
Ignore:
Timestamp:
05/20/08 19:22:05 (18 months ago)
Author:
bchoate
Message:

Use default of 'Anonymous' for CommentAuthor tag unless a default attribute is explicitly given. BugId:79842

Location:
branches/release-38
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/release-38/lib/MT/Template/ContextHandlers.pm

    r2377 r2400  
    99899989=cut 
    99909990 
    9991 # FIXME: This should be a container tag providing an author 
    9992 # context for the comment. 
    99939991sub _hdlr_comment_author { 
    99949992    my ($ctx, $args) = @_; 
     
    99979995        or return $ctx->_no_comment_error(); 
    99989996    my $a = defined $c->author ? $c->author : ''; 
    9999     $a ||= $args->{default} || ''; 
     9997    $args->{default} = MT->translate("Anonymous") 
     9998        unless exists $args->{default}; 
     9999    $a ||= $args->{default}; 
    1000010000    return remove_html($a);     
    1000110001} 
  • branches/release-38/php/lib/function.mtcommentauthor.php

    r2395 r2400  
    2020    if (isset($args['default'])) 
    2121        $a or $a = $args['default']; 
     22    else { 
     23        global $mt; 
     24        $a or $a = $mt->translate("Anonymous"); 
     25    } 
    2226    $a or $a = ''; 
    2327    return strip_tags($a);