$this->getUserInput( $user ) . "\n" .
$this->getTitleInput( $page ) . "\n" .
( !$wgMiserMode ? ($this->getTitlePattern( $pattern )."\n") : "" ) .
- "<p>" . $this->getDateMenu( $year, $month ) . "\n" .
+ "<p>" . Xml::dateMenu( $year, $month ) . "\n" .
( $tagSelector ? Xml::tags( 'p', null, implode( ' ', $tagSelector ) ) :'' ). "\n" .
( $filter ? "</p><p>".$this->getFilterLinks( $type, $filter )."\n" : "" ) . "\n" .
Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "</p>\n" .
return Xml::inputLabel( wfMsg( 'speciallogtitlelabel' ), 'page', 'page', 20, $title );
}
- /**
- * @param $year Integer
- * @param $month Integer
- * @return string Formatted HTML
- */
- private function getDateMenu( $year, $month ) {
- return Xml::dateMenu( $year, $month );
- }
-
/**
* @return boolean Checkbox
*/
$this->mLogEventsList = $list;
- $this->limitType( $type ); // excludes hidden types too
+ $this->limitType( $type ); // also excludes hidden types
$this->limitUser( $user );
$this->limitTitle( $title, $pattern );
$this->getDateCond( $year, $month );
Xml::fieldset( wfMsg( 'history-fieldset-title' ), false, array( 'id' => 'mw-history-search' ) ) .
Xml::hidden( 'title', $this->mTitle->getPrefixedDBKey() ) . "\n" .
Xml::hidden( 'action', 'history' ) . "\n" .
- $this->getDateMenu( $year, $month ) . ' ' .
+ xml::dateMenu( $year, $month ) . ' ' .
( $tagSelector ? ( implode( ' ', $tagSelector ) . ' ' ) : '' ) .
Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" .
'</fieldset></form>'
wfProfileOut( __METHOD__ );
}
- /**
- * @return string Formatted HTML
- * @param int $year
- * @param int $month
- */
- private function getDateMenu( $year, $month ) {
- # Offset overrides year/month selection
- if( $month && $month !== -1 ) {
- $encMonth = intval( $month );
- } else {
- $encMonth = '';
- }
- if( $year ) {
- $encYear = intval( $year );
- } else if( $encMonth ) {
- $thisMonth = intval( gmdate( 'n' ) );
- $thisYear = intval( gmdate( 'Y' ) );
- if( intval($encMonth) > $thisMonth ) {
- $thisYear--;
- }
- $encYear = $thisYear;
- } else {
- $encYear = '';
- }
- return Xml::label( wfMsg( 'year' ), 'year' ) . ' '.
- Xml::input( 'year', 4, $encYear, array('id' => 'year', 'maxlength' => 4) ) .
- ' '.
- Xml::label( wfMsg( 'month' ), 'month' ) . ' '.
- Xml::monthSelector( $encMonth, -1 );
- }
-
/**
* Creates begin of history list with a submit button
*