X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialContributions.php;h=1b14fcbe10a9810b6da05b8488d3be845c6e4705;hp=e2fa8a3001ff62fe954a8c1192678af878b2e2ee;hb=fb79f30319b9ad2a7eb0f5f4d1668143ec8f963e;hpb=8b706516e027a7ad81f04b123fd53d77f351787a diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index e2fa8a3001..1b14fcbe10 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\Widget\DateInputWidget; + /** * Special:Contributions, show user contributions in a paged list * @@ -129,17 +131,14 @@ class SpecialContributions extends IncludableSpecialPage { $skip = $request->getText( 'offset' ) || $request->getText( 'dir' ) == 'prev'; # Offset overrides year/month selection - if ( $skip ) { - $this->opts['year'] = ''; - $this->opts['month'] = ''; - } else { + if ( !$skip ) { $this->opts['year'] = $request->getVal( 'year' ); $this->opts['month'] = $request->getVal( 'month' ); $this->opts['start'] = $request->getVal( 'start' ); $this->opts['end'] = $request->getVal( 'end' ); - $this->opts = ContribsPager::processDateFilter( $this->opts ); } + $this->opts = ContribsPager::processDateFilter( $this->opts ); $feedType = $request->getVal( 'feed' ); @@ -327,7 +326,6 @@ class SpecialContributions extends IncludableSpecialPage { * @return array */ public static function getUserLinks( SpecialPage $sp, User $target ) { - $id = $target->getId(); $username = $target->getName(); $userpage = $target->getUserPage(); @@ -665,7 +663,7 @@ class SpecialContributions extends IncludableSpecialPage { 'div', [], Xml::label( wfMessage( 'date-range-from' )->text(), 'mw-date-start' ) . ' ' . - new \Mediawiki\Widget\DateInputWidget( [ + new DateInputWidget( [ 'infusable' => true, 'id' => 'mw-date-start', 'name' => 'start', @@ -673,7 +671,7 @@ class SpecialContributions extends IncludableSpecialPage { 'longDisplayFormat' => true, ] ) . '
' . Xml::label( wfMessage( 'date-range-to' )->text(), 'mw-date-end' ) . ' ' . - new \Mediawiki\Widget\DateInputWidget( [ + new DateInputWidget( [ 'infusable' => true, 'id' => 'mw-date-end', 'name' => 'end',