Merge "RCFilters: Don't load JS or redirect when transcluding"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 20 Dec 2017 19:08:02 +0000 (19:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 20 Dec 2017 19:08:02 +0000 (19:08 +0000)
1  2 
includes/specialpage/ChangesListSpecialPage.php

@@@ -570,15 -570,8 +570,15 @@@ abstract class ChangesListSpecialPage e
                        // Used by "live update" and "view newest" to check
                        // if there's new changes with minimal data transfer
                        if ( $this->getRequest()->getBool( 'peek' ) ) {
 -                      $code = $rows->numRows() > 0 ? 200 : 204;
 +                              $code = $rows->numRows() > 0 ? 200 : 204;
                                $this->getOutput()->setStatusCode( $code );
 +
 +                              if ( $this->getUser()->isAnon() !==
 +                                      $this->getRequest()->getFuzzyBool( 'isAnon' )
 +                              ) {
 +                                      $this->getOutput()->setStatusCode( 205 );
 +                              }
 +
                                return;
                        }
  
         * redirect properly with all necessary query parameters.
         */
        protected function considerActionsForDefaultSavedQuery() {
-               if ( !$this->isStructuredFilterUiEnabled() ) {
+               if ( !$this->isStructuredFilterUiEnabled() || $this->including() ) {
                        return;
                }
  
         */
        protected function includeRcFiltersApp() {
                $out = $this->getOutput();
-               if ( $this->isStructuredFilterUiEnabled() ) {
+               if ( $this->isStructuredFilterUiEnabled() && !$this->including() ) {
                        $jsData = $this->getStructuredFilterJsData();
  
                        $messages = [];
                ] );
                $out->addModules( 'mediawiki.special.changeslist.legend.js' );
  
-               if ( $this->isStructuredFilterUiEnabled() ) {
+               if ( $this->isStructuredFilterUiEnabled() && !$this->including() ) {
                        $out->addModules( 'mediawiki.rcfilters.filters.ui' );
                        $out->addModuleStyles( 'mediawiki.rcfilters.filters.base.styles' );
                }