Changeset 2055

Show
Ignore:
Timestamp:
04/24/08 21:15:53 (22 months ago)
Author:
bchoate
Message:

Display auth'd commenter name for comment author tag when comment was posted by auth'd user. BugId:79475

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-36/php/lib/function.mtcommentauthor.php

    r1174 r2055  
    88function smarty_function_mtcommentauthor($args, &$ctx) { 
    99    $c = $ctx->stash('comment'); 
    10     if (!$c) { 
     10    if (!$c) 
    1111        return $ctx->error("No comment available"); 
     12    $a = isset($c['comment_author']) ? $c['comment_author'] : ''; 
     13    if ($c['comment_commenter_id']) { 
     14        $commenter = $ctx->stash('commenter'); 
     15        if ($commenter) 
     16            $a = $commenter['author_nickname']; 
    1217    } 
    13     $a = isset($c['comment_author']) ? $c['comment_author'] : ''; 
    14     if (isset($args['default'])) { 
     18    if (isset($args['default'])) 
    1519        $a or $a = $args['default']; 
    16     } 
    1720    $a or $a = ''; 
    1821    return strip_tags($a); 
    1922} 
    20 ?>