From: Liangent Date: Tue, 7 May 2013 15:43:22 +0000 (+0000) Subject: (bug 48212) Fix I720946e7: $this->opts['year'] shouldn't be modified. X-Git-Tag: 1.31.0-rc.0~19746 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=af764dba38b2b3aa15433d6f55dbed18f217944c;p=lhc%2Fweb%2Fwiklou.git (bug 48212) Fix I720946e7: $this->opts['year'] shouldn't be modified. Otherwise, the offset is set automatically based on the default 'year' parameter, then ReverseChronologicalPager gets misled and assumes that the user have already specified a starting point so there must be a previous page, causing a 'prev' link returning nothing shown. Bug: 48212 Bug: 45580 Change-Id: I5341ff8c0d0422b9b3184dce74f0f143822cfe93 --- diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 52261c9f23..21becd66ec 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -388,7 +388,7 @@ class SpecialContributions extends SpecialPage { } if ( !isset( $this->opts['year'] ) ) { - $this->opts['year'] = gmdate( 'Y' ); + $this->opts['year'] = ''; } if ( !isset( $this->opts['month'] ) ) { @@ -566,7 +566,7 @@ class SpecialContributions extends SpecialPage { $dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ), Xml::dateMenu( - $this->opts['year'], + $this->opts['year'] === '' ? gmdate( 'Y' ) : $this->opts['year'], $this->opts['month'] ) . ' ' . Xml::submitButton(