$this->doQuery();
}
// Hide navigation by default if there is nothing to page
- return !($this->mIsFirst && $this->mIsLast);
+ return !( $this->mIsFirst && $this->mIsLast );
}
/**
$year = $this->mYear;
} else {
// If no year given, assume the current one
- $year = gmdate( 'Y' );
+ $timestamp = MWTimestamp::getInstance();
+ $year = $timestamp->format( 'Y' );
// If this month hasn't happened yet this year, go back to last year's month
- if ( $this->mMonth > gmdate( 'n' ) ) {
+ if ( $this->mMonth > $timestamp->format( 'n' ) ) {
$year--;
}
}
/**
* Get a "<select>" element which has options for each of the allowed limits
*
+ * @param $attribs String: Extra attributes to set
* @return String: HTML fragment
*/
- public function getLimitSelect() {
+ public function getLimitSelect( $attribs = array() ) {
$select = new XmlSelect( 'limit', false, $this->mLimit );
$select->addOptions( $this->getLimitSelectList() );
+ foreach ( $attribs as $name => $value ) {
+ $select->setAttribute( $name, $value );
+ }
return $select->getHTML();
}