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
}
if ( !isset( $this->opts['year'] ) ) {
- $this->opts['year'] = gmdate( 'Y' );
+ $this->opts['year'] = '';
}
if ( !isset( $this->opts['month'] ) ) {
$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(