Merge "Extract addition of conflict header explanation"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 9 Nov 2016 17:04:37 +0000 (17:04 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 9 Nov 2016 17:04:37 +0000 (17:04 +0000)
1  2 
includes/EditPage.php

diff --combined includes/EditPage.php
@@@ -2866,11 -2866,10 +2866,11 @@@ class EditPage 
        }
  
        protected function showHeader() {
 +              global $wgOut, $wgUser;
                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' ) {
                                        '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' );
+       }
  }