Kill $wgEnableNewpagesUserFilter
authorThis, that and the other <at.light@live.com.au>
Sat, 21 Jun 2014 02:05:08 +0000 (12:05 +1000)
committerThis, that and the other <at.light@live.com.au>
Sat, 21 Jun 2014 02:07:47 +0000 (12:07 +1000)
A temporary WMF hack from 2008 (r34065). No longer needed.

Bug: 58932
Change-Id: Ia25ddc32a0f08587301461c669499e4b8bdf3adb

includes/DefaultSettings.php
includes/specials/SpecialNewpages.php

index 02d1c5a..bc7959b 100644 (file)
@@ -5647,13 +5647,6 @@ $wgRCEngines = array(
        'udp' => 'UDPRCFeedEngine',
 );
 
-/**
- * Enable user search in Special:Newpages
- * This is really a temporary hack around an index install bug on some Wikipedias.
- * Kill it once fixed.
- */
-$wgEnableNewpagesUserFilter = true;
-
 /**
  * Use RC Patrolling to check for vandalism
  */
index 505a1ec..1ec7006 100644 (file)
@@ -40,8 +40,6 @@ class SpecialNewpages extends IncludableSpecialPage {
        }
 
        protected function setup( $par ) {
-               global $wgEnableNewpagesUserFilter;
-
                // Options
                $opts = new FormOptions();
                $this->opts = $opts; // bind
@@ -71,9 +69,6 @@ class SpecialNewpages extends IncludableSpecialPage {
 
                // Validate
                $opts->validateIntBounds( 'limit', 0, 5000 );
-               if ( !$wgEnableNewpagesUserFilter ) {
-                       $opts->setValue( 'username', '' );
-               }
        }
 
        protected function parseParams( $par ) {
@@ -204,7 +199,7 @@ class SpecialNewpages extends IncludableSpecialPage {
        }
 
        protected function form() {
-               global $wgEnableNewpagesUserFilter, $wgScript;
+               global $wgScript;
 
                // Consume values
                $this->opts->consumeValue( 'offset' ); // don't carry offset, DWIW
@@ -265,15 +260,14 @@ class SpecialNewpages extends IncludableSpecialPage {
                                $tagFilterSelector .
                                '</td>
                        </tr>' ) : '' ) .
-                       ( $wgEnableNewpagesUserFilter ?
-                               '<tr>
+                       '<tr>
                                <td class="mw-label">' .
                                        Xml::label( $this->msg( 'newpages-username' )->text(), 'mw-np-username' ) .
                                        '</td>
                                <td class="mw-input">' .
                                        Xml::input( 'username', 30, $userText, array( 'id' => 'mw-np-username' ) ) .
                                        '</td>
-                       </tr>' : '' ) .
+                       </tr>' .
                        '<tr> <td></td>
                                <td class="mw-submit">' .
                        Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
@@ -512,7 +506,6 @@ class NewPagesPager extends ReverseChronologicalPager {
        }
 
        function getQueryInfo() {
-               global $wgEnableNewpagesUserFilter;
                $conds = array();
                $conds['rc_new'] = 1;
 
@@ -532,8 +525,7 @@ class NewPagesPager extends ReverseChronologicalPager {
                        }
                }
 
-               # $wgEnableNewpagesUserFilter - temp WMF hack
-               if ( $wgEnableNewpagesUserFilter && $user ) {
+               if ( $user ) {
                        $conds['rc_user_text'] = $user->getText();
                        $rcIndexes = 'rc_user_text';
                } elseif ( User::groupHasPermission( '*', 'createpage' ) &&