X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialNewpages.php;h=1ec70061883284b934fc73dabd679d9d5f2d1c6c;hb=f0edb3e368a5fc69218d20f76f1538b68f37db42;hp=66ec693cd5486d6ec551828026502f245e92e635;hpb=2e040b99eda6c99cf472b3896f62d2f21315e808;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 66ec693cd5..1ec7006188 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -27,15 +27,12 @@ * @ingroup SpecialPage */ class SpecialNewpages extends IncludableSpecialPage { - // Stored objects - /** * @var FormOptions */ protected $opts; protected $customFilters; - // Some internal settings protected $showNavigation = false; public function __construct() { @@ -43,8 +40,6 @@ class SpecialNewpages extends IncludableSpecialPage { } protected function setup( $par ) { - global $wgEnableNewpagesUserFilter; - // Options $opts = new FormOptions(); $this->opts = $opts; // bind @@ -74,9 +69,6 @@ class SpecialNewpages extends IncludableSpecialPage { // Validate $opts->validateIntBounds( 'limit', 0, 5000 ); - if ( !$wgEnableNewpagesUserFilter ) { - $opts->setValue( 'username', '' ); - } } protected function parseParams( $par ) { @@ -207,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 @@ -268,15 +260,14 @@ class SpecialNewpages extends IncludableSpecialPage { $tagFilterSelector . ' ' ) : '' ) . - ( $wgEnableNewpagesUserFilter ? - ' + ' ' . Xml::label( $this->msg( 'newpages-username' )->text(), 'mw-np-username' ) . ' ' . Xml::input( 'username', 30, $userText, array( 'id' => 'mw-np-username' ) ) . ' - ' : '' ) . + ' . ' ' . Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . @@ -394,7 +385,8 @@ class SpecialNewpages extends IncludableSpecialPage { $oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped(); } - return "{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}\n"; + return "{$time} {$dm}{$plink} {$hist} {$dm}{$length} " + . "{$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}\n"; } /** @@ -514,7 +506,6 @@ class NewPagesPager extends ReverseChronologicalPager { } function getQueryInfo() { - global $wgEnableNewpagesUserFilter; $conds = array(); $conds['rc_new'] = 1; @@ -534,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' ) &&