From db6f6bd21c2a4ad222f29fcf7ed9ae82f4a376aa Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 12 Jul 2011 15:38:07 +0000 Subject: [PATCH] * In EditPage.php: don't add the separator if getCancelLink() returns an empty string * In TalkHere extension: override getCancelLink() instead of having mangleEditForm() hack --- includes/EditPage.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index a17b4b1377..16fd9fa981 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1924,12 +1924,14 @@ HTML $wgOut->addHTML( implode( $this->getEditButtons( $tabindex ), "\n" ) . "\n" ); $cancel = $this->getCancelLink(); - $separator = wfMsgExt( 'pipe-separator' , 'escapenoentities' ); + if ( $cancel !== '' ) { + $cancel .= wfMsgExt( 'pipe-separator' , 'escapenoentities' ); + } $edithelpurl = Skin::makeInternalOrExternalUrl( wfMsgForContent( 'edithelppage' ) ); $edithelp = ''. htmlspecialchars( wfMsg( 'edithelp' ) ).' '. htmlspecialchars( wfMsg( 'newwindow' ) ); - $wgOut->addHTML( " {$cancel}{$separator}{$edithelp}\n" ); + $wgOut->addHTML( " {$cancel}{$edithelp}\n" ); $wgOut->addHTML( "\n\n" ); } -- 2.20.1