Merge "RCLFilters: display target page as a title"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 13 Dec 2017 21:14:28 +0000 (21:14 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 13 Dec 2017 21:14:28 +0000 (21:14 +0000)
autoload.php
includes/export/ExportProgressFilter.php [new file with mode: 0644]
includes/specials/SpecialWatchlist.php
maintenance/backup.inc
resources/src/mediawiki.legacy/wikibits.js
resources/src/mediawiki/mediawiki.js
resources/src/startup.js

index 8aa6afb..5580bed 100644 (file)
@@ -449,7 +449,7 @@ $wgAutoloadLocalClasses = [
        'Exif' => __DIR__ . '/includes/media/Exif.php',
        'ExifBitmapHandler' => __DIR__ . '/includes/media/ExifBitmap.php',
        'ExplodeIterator' => __DIR__ . '/includes/libs/ExplodeIterator.php',
-       'ExportProgressFilter' => __DIR__ . '/maintenance/backup.inc',
+       'ExportProgressFilter' => __DIR__ . '/includes/export/ExportProgressFilter.php',
        'ExportSites' => __DIR__ . '/maintenance/exportSites.php',
        'ExtensionJsonValidationError' => __DIR__ . '/includes/registration/ExtensionJsonValidationError.php',
        'ExtensionJsonValidator' => __DIR__ . '/includes/registration/ExtensionJsonValidator.php',
diff --git a/includes/export/ExportProgressFilter.php b/includes/export/ExportProgressFilter.php
new file mode 100644 (file)
index 0000000..9b1571f
--- /dev/null
@@ -0,0 +1,47 @@
+<?php
+/**
+ * Copyright © 2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup Dump
+ */
+class ExportProgressFilter extends DumpFilter {
+       /**
+        * @var BackupDumper
+        */
+       private $progress;
+
+       function __construct( &$sink, &$progress ) {
+               parent::__construct( $sink );
+               $this->progress = $progress;
+       }
+
+       function writeClosePage( $string ) {
+               parent::writeClosePage( $string );
+               $this->progress->reportPage();
+       }
+
+       function writeRevision( $rev, $string ) {
+               parent::writeRevision( $rev, $string );
+               $this->progress->revCount();
+       }
+}
index e8e828d..2ad70a6 100644 (file)
@@ -117,11 +117,6 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                );
        }
 
-       public function isStructuredFilterUiEnabledByDefault() {
-               return $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' ) &&
-                       $this->getUser()->getDefaultOption( 'rcenhancedfilters' );
-       }
-
        /**
         * Return an array of subpages that this special page will accept.
         *
index 341a299..00dbd00 100644 (file)
@@ -25,7 +25,6 @@
  */
 
 require_once __DIR__ . '/Maintenance.php';
-require_once __DIR__ . '/../includes/export/DumpFilter.php';
 
 use Wikimedia\Rdbms\LoadBalancer;
 use Wikimedia\Rdbms\IDatabase;
@@ -420,20 +419,3 @@ class BackupDumper extends Maintenance {
                }
        }
 }
-
-class ExportProgressFilter extends DumpFilter {
-       function __construct( &$sink, &$progress ) {
-               parent::__construct( $sink );
-               $this->progress = $progress;
-       }
-
-       function writeClosePage( $string ) {
-               parent::writeClosePage( $string );
-               $this->progress->reportPage();
-       }
-
-       function writeRevision( $rev, $string ) {
-               parent::writeRevision( $rev, $string );
-               $this->progress->revCount();
-       }
-}
index f5bdfd8..27d049e 100644 (file)
@@ -49,7 +49,7 @@
                loadedScripts[ url ] = true;
                s = document.createElement( 'script' );
                s.setAttribute( 'src', url );
-               document.getElementsByTagName( 'head' )[ 0 ].appendChild( s );
+               document.head.appendChild( s );
                return s;
        }
 
@@ -72,7 +72,7 @@
                if ( media ) {
                        l.media = media;
                }
-               document.getElementsByTagName( 'head' )[ 0 ].appendChild( l );
+               document.head.appendChild( l );
                return l;
        }
 
index a661ae5..592fc9e 100644 (file)
                                if ( nextNode && nextNode.parentNode ) {
                                        nextNode.parentNode.insertBefore( s, nextNode );
                                } else {
-                                       document.getElementsByTagName( 'head' )[ 0 ].appendChild( s );
+                                       document.head.appendChild( s );
                                }
 
                                return s;
index b0c1578..8e8463d 100644 (file)
@@ -162,5 +162,5 @@ window.isCompatible = function ( str ) {
                // Callback
                startUp();
        };
-       document.getElementsByTagName( 'head' )[ 0 ].appendChild( script );
+       document.head.appendChild( script );
 }() );