Follow-up to r47192: do the same for PageHistory
This commit is contained in:
parent
1e06acb820
commit
1f1fc5e1bc
2 changed files with 3 additions and 43 deletions
|
|
@ -85,7 +85,7 @@ class LogEventsList {
|
|||
$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" .
|
||||
|
|
@ -180,15 +180,6 @@ class LogEventsList {
|
|||
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
|
||||
*/
|
||||
|
|
@ -504,7 +495,7 @@ class LogPager extends ReverseChronologicalPager {
|
|||
|
||||
$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 );
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class PageHistory {
|
|||
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>'
|
||||
|
|
@ -147,37 +147,6 @@ class PageHistory {
|
|||
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
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue