Extract addition of conflict header explanation

This is done so it can be altered when using an alternative EditPage.

Bug: T143823
Change-Id: I31f5f2b7d35806a11925fb00e3272cac47c783ec
This commit is contained in:
WMDE-Fisch 2016-10-27 15:49:49 +02:00 committed by WMDE-Fisch
parent ea60bd7c46
commit a35adefb26

View file

@ -2869,7 +2869,7 @@ class EditPage {
global $wgAllowUserCss, $wgAllowUserJs;
if ( $this->isConflict ) {
$wgOut->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );
$this->addExplainConflictHeader( $wgOut );
$this->editRevId = $this->page->getLatest();
} else {
if ( $this->section != '' && $this->section != 'new' ) {
@ -4434,4 +4434,12 @@ HTML
'wrap' => "<div class=\"mw-titleprotectedwarning\">\n$1</div>" ] );
}
}
/**
* @param OutputPage &$out
* @since 1.29
*/
protected function addExplainConflictHeader( OutputPage &$out ) {
$out->wrapWikiMsg( "<div class='mw-explainconflict'>\n$1\n</div>", 'explainconflict' );
}
}