Extract addition of conflict header explanation
authorWMDE-Fisch <christoph.fischer@wikimedia.de>
Thu, 27 Oct 2016 13:49:49 +0000 (15:49 +0200)
committerWMDE-Fisch <christoph.jauera@wikimedia.de>
Wed, 9 Nov 2016 16:22:11 +0000 (16:22 +0000)
This is done so it can be altered when using an alternative EditPage.

Bug: T143823
Change-Id: I31f5f2b7d35806a11925fb00e3272cac47c783ec

includes/EditPage.php

index 78ef2e3..85c14fc 100644 (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' );
+       }
 }