Merge "EditPage: Try to avoid using $wgTitle"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 20 Sep 2017 15:59:47 +0000 (15:59 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 20 Sep 2017 15:59:47 +0000 (15:59 +0000)
1  2 
includes/EditPage.php

diff --combined includes/EditPage.php
@@@ -469,6 -469,10 +469,10 @@@ class EditPage 
         */
        public function getContextTitle() {
                if ( is_null( $this->mContextTitle ) ) {
+                       wfDebugLog(
+                               'GlobalTitleFail',
+                               __METHOD__ . ' called by ' . wfGetAllCallers( 5 ) . ' with no title set.'
+                       );
                        global $wgTitle;
                        return $wgTitle;
                } else {
         * @return array
         */
        public function getCheckboxes( &$tabindex, $checked ) {
 -              global $wgUseMediaWikiUIEverywhere;
 -
                $checkboxes = [];
                $checkboxesDef = $this->getCheckboxesDefinition( $checked );
  
                                '&#160;' .
                                Xml::tags( 'label', $labelAttribs, $label );
  
 -                      if ( $wgUseMediaWikiUIEverywhere ) {
 -                              $checkboxHtml = Html::rawElement( 'div', [ 'class' => 'mw-ui-checkbox' ], $checkboxHtml );
 -                      }
 -
                        $checkboxes[ $legacyName ] = $checkboxHtml;
                }