if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
$row .= '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-comment' ) . '</span>';
} else {
- $row .= $this->skin->commentBlock( $description, $this->title );
+ $row .= $this->skin->commentBlock( $description, $this->title, false, false );
}
$row .= '</td>';
* @param $comment String
* @param $title Mixed: Title object (to generate link to section in autocomment) or null
* @param $local Boolean: whether section links should refer to local page
- *
+ * @param $embraced Boolean: whether the formatted comment should be embraced with ()
* @return string
*/
- static function commentBlock( $comment, $title = null, $local = false ) {
+ static function commentBlock( $comment, $title = null, $local = false, $embraced = true ) {
// '*' used to be the comment inserted by the software way back
// in antiquity in case none was provided, here for backwards
// compatability, acc. to brion -ævar
return '';
} else {
$formatted = self::formatComment( $comment, $title, $local );
- return " <span class=\"comment\">($formatted)</span>";
+ if ( $embraced ) {
+ $formatted = wfMessage( 'parentheses', $formatted );
+ }
+ return Html::rawElement( 'span', array( 'class' => 'comment' ), $formatted );
}
}
case 'img_size':
return $this->getSkin()->formatSize( $value );
case 'img_description':
- return $this->getSkin()->commentBlock( $value );
+ return $this->getSkin()->commentBlock( $value, null, false, false );
case 'count':
return intval($value)+1;
}