Merge "Extract addition of conflict header explanation"
[lhc/web/wiklou.git] / includes / EditPage.php
index 3c47a3f..24fa89a 100644 (file)
@@ -2870,7 +2870,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' ) {
@@ -4435,4 +4435,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' );
+       }
 }