From 95441782ba2a6881ba022cc7fcf95aa9e9de9047 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 8 Dec 2005 20:19:33 +0000 Subject: [PATCH] * Support a third paramater to Linker::commentBlock() that indicates whether or not the comment is from a deleted revision. --- includes/Linker.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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)"; + } } } -- 2.20.1