Merge "Make SpecialWhatLinkshere::showIndirectLinks use buildSelectSubquery()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 29 Mar 2018 04:07:42 +0000 (04:07 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 29 Mar 2018 04:07:42 +0000 (04:07 +0000)
includes/GlobalFunctions.php
includes/actions/RawAction.php
includes/libs/rdbms/lbfactory/LBFactory.php
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js

index 42a6573..513f593 100644 (file)
@@ -3019,7 +3019,7 @@ function wfWaitForSlaves(
        $ifWritesSince = null, $wiki = false, $cluster = false, $timeout = null
 ) {
        if ( $timeout === null ) {
-               $timeout = wfIsCLI() ? 86400 : 10;
+               $timeout = wfIsCLI() ? 60 : 10;
        }
 
        if ( $cluster === '*' ) {
index be10ae4..625a9bb 100644 (file)
@@ -59,11 +59,6 @@ class RawAction extends FormlessAction {
                        return; // Client cache fresh and headers sent, nothing more to do.
                }
 
-               $gen = $request->getVal( 'gen' );
-               if ( $gen == 'css' || $gen == 'js' ) {
-                       $this->gen = true;
-               }
-
                $contentType = $this->getContentType();
 
                $maxage = $request->getInt( 'maxage', $config->get( 'SquidMaxage' ) );
@@ -175,7 +170,7 @@ class RawAction extends FormlessAction {
                        }
                }
 
-               if ( $text !== false && $text !== '' && $request->getVal( 'templates' ) === 'expand' ) {
+               if ( $text !== false && $text !== '' && $request->getRawVal( 'templates' ) === 'expand' ) {
                        $text = $wgParser->preprocess(
                                $text,
                                $title,
@@ -225,10 +220,14 @@ class RawAction extends FormlessAction {
         * @return string
         */
        public function getContentType() {
-               $ctype = $this->getRequest()->getVal( 'ctype' );
+               // Use getRawVal instead of getVal because we only
+               // need to match against known strings, there is no
+               // storing of localised content or other user input.
+               $ctype = $this->getRequest()->getRawVal( 'ctype' );
 
                if ( $ctype == '' ) {
-                       $gen = $this->getRequest()->getVal( 'gen' );
+                       // Legacy compatibilty
+                       $gen = $this->getRequest()->getRawVal( 'gen' );
                        if ( $gen == 'js' ) {
                                $ctype = 'text/javascript';
                        } elseif ( $gen == 'css' ) {
index 32886e2..bc428ec 100644 (file)
@@ -313,7 +313,7 @@ abstract class LBFactory implements ILBFactory {
                $opts += [
                        'domain' => false,
                        'cluster' => false,
-                       'timeout' => 60,
+                       'timeout' => $this->cliMode ? 60 : 10,
                        'ifWritesSince' => null
                ];
 
index f546d97..89ad382 100644 (file)
@@ -25,7 +25,7 @@
                // Parent
                mw.rcfilters.ui.SaveFiltersPopupButtonWidget.parent.call( this, $.extend( {
                        framed: false,
-                       icon: 'unClip',
+                       icon: 'bookmark',
                        title: mw.msg( 'rcfilters-savedqueries-add-new-title' ),
                        popup: {
                                classes: [ 'mw-rcfilters-ui-saveFiltersPopupButtonWidget-popup' ],
@@ -36,7 +36,7 @@
                        }
                }, config ) );
                // // HACK: Add an icon to the popup head label
-               this.popup.$head.prepend( ( new OO.ui.IconWidget( { icon: 'unClip' } ) ).$element );
+               this.popup.$head.prepend( ( new OO.ui.IconWidget( { icon: 'bookmark' } ) ).$element );
 
                this.input = new OO.ui.TextInputWidget( {
                        placeholder: mw.msg( 'rcfilters-savedqueries-new-name-placeholder' )
index 7077434..088aa5b 100644 (file)
@@ -34,7 +34,7 @@
                this.placeholderItem = new OO.ui.DecoratedOptionWidget( {
                        classes: [ 'mw-rcfilters-ui-savedLinksListWidget-placeholder' ],
                        label: $labelNoEntries,
-                       icon: 'unClip'
+                       icon: 'bookmark'
                } );
 
                this.menu = new mw.rcfilters.ui.GroupWidget( {
@@ -50,7 +50,7 @@
                this.button = new OO.ui.PopupButtonWidget( {
                        classes: [ 'mw-rcfilters-ui-savedLinksListWidget-button' ],
                        label: mw.msg( 'rcfilters-quickfilters' ),
-                       icon: 'unClip',
+                       icon: 'bookmark',
                        indicator: 'down',
                        $overlay: this.$overlay,
                        popup: {