Changeset 2055
- Timestamp:
- 04/24/08 21:15:53 (22 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/release-36/php/lib/function.mtcommentauthor.php
r1174 r2055 8 8 function smarty_function_mtcommentauthor($args, &$ctx) { 9 9 $c = $ctx->stash('comment'); 10 if (!$c) {10 if (!$c) 11 11 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']; 12 17 } 13 $a = isset($c['comment_author']) ? $c['comment_author'] : ''; 14 if (isset($args['default'])) { 18 if (isset($args['default'])) 15 19 $a or $a = $args['default']; 16 }17 20 $a or $a = ''; 18 21 return strip_tags($a); 19 22 } 20 ?>
