From: Ævar Arnfjörð Bjarmason Date: Thu, 8 Dec 2005 20:19:33 +0000 (+0000) Subject: * Support a third paramater to Linker::commentBlock() that indicates whether or X-Git-Tag: 1.6.0~982 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=95441782ba2a6881ba022cc7fcf95aa9e9de9047;p=lhc%2Fweb%2Fwiklou.git * Support a third paramater to Linker::commentBlock() that indicates whether or not the comment is from a deleted revision. --- diff --git a/includes/Linker.php b/includes/Linker.php index 3348c5809d..a71bffe8cc 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -744,15 +744,23 @@ class Linker { * * @param string $comment * @param Title $title + * @param bool $deleted + * * @return string - * @access public */ - function commentBlock( $comment, $title = NULL ) { + function commentBlock( $comment, $title = NULL, $deleted = false ) { + // '*' 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 if( $comment == '' || $comment == '*' ) { return ''; } else { - $formatted = $this->formatComment( $comment, $title ); - return " ($formatted)"; + if ( $deleted ) + return " (...)"; + else { + $formatted = $this->formatComment( $comment, $title ); + return " ($formatted)"; + } } }