From 114de163d829b16f931b3aa8b384ed9704a54acd Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 11 Jul 2007 17:45:25 +0000 Subject: [PATCH] Don't spew () when tools group is empty (as on last line where there can be no undo link) --- includes/PageHistory.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 7e7c541450..a29492d11d 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -262,7 +262,9 @@ class PageHistory { $tools[] = "{$undolink}"; } - $s .= ' (' . implode( ' | ', $tools ) . ')'; + if( $tools ) { + $s .= ' (' . implode( ' | ', $tools ) . ')'; + } wfRunHooks( 'PageHistoryLineEnding', array( &$row , &$s ) ); -- 2.20.1