Merge "resourceloader: Add tests for OutputPage::buildExemptModules"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 23 May 2017 01:00:55 +0000 (01:00 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 23 May 2017 01:00:55 +0000 (01:00 +0000)
1  2 
includes/OutputPage.php

diff --combined includes/OutputPage.php
@@@ -1773,6 -1773,17 +1773,6 @@@ class OutputPage extends ContextSource 
                $this->addParserOutput( $parserOutput );
        }
  
 -      /**
 -       * Add a ParserOutput object, but without Html.
 -       *
 -       * @deprecated since 1.24, use addParserOutputMetadata() instead.
 -       * @param ParserOutput $parserOutput
 -       */
 -      public function addParserOutputNoText( $parserOutput ) {
 -              wfDeprecated( __METHOD__, '1.24' );
 -              $this->addParserOutputMetadata( $parserOutput );
 -      }
 -
        /**
         * Add all metadata associated with a ParserOutput object, but without the actual HTML. This
         * includes categories, language links, ResourceLoader modules, effects of certain magic words,
                        && $this->userCanPreview();
        }
  
-       private function isUserCssPreview() {
+       protected function isUserCssPreview() {
                return $this->getConfig()->get( 'AllowUserCss' )
                        && $this->getTitle()
                        && $this->getTitle()->isCssSubpage()
                $vars['wgIsProbablyEditable'] = $title->quickUserCan( 'edit', $user )
                        && ( $title->exists() || $title->quickUserCan( 'create', $user ) );
  
 +              $vars['wgRelevantPageIsProbablyEditable'] = $relevantTitle
 +                      && $relevantTitle->quickUserCan( 'edit', $user )
 +                      && ( $relevantTitle->exists() || $relevantTitle->quickUserCan( 'create', $user ) );
 +
                foreach ( $title->getRestrictionTypes() as $type ) {
                        $vars['wgRestriction' . ucfirst( $type )] = $title->getRestrictions( $type );
                }
                return $tags;
        }
  
 -      /**
 -       * @return string HTML tag links to be put in the header.
 -       * @deprecated since 1.24 Use OutputPage::headElement or if you have to,
 -       *   OutputPage::getHeadLinksArray directly.
 -       */
 -      public function getHeadLinks() {
 -              wfDeprecated( __METHOD__, '1.24' );
 -              return implode( "\n", $this->getHeadLinksArray() );
 -      }
 -
        /**
         * Generate a "<link rel/>" for a feed.
         *