(bug 41330) Default to the current year in the history page filter form
authorAlex Monk <krenair@gmail.com>
Mon, 17 Dec 2012 00:59:28 +0000 (00:59 +0000)
committerAlex Monk <krenair@gmail.com>
Mon, 17 Dec 2012 00:59:28 +0000 (00:59 +0000)
Change-Id: Ia510f0a24248f95c839ab88062cee1c0c0b9b6c1

includes/actions/HistoryAction.php

index 61de3b6..999a14b 100644 (file)
@@ -176,7 +176,7 @@ class HistoryAction extends FormlessAction {
                        ) .
                        Html::hidden( 'title', $this->getTitle()->getPrefixedDBKey() ) . "\n" .
                        Html::hidden( 'action', 'history' ) . "\n" .
-                       Xml::dateMenu( $year, $month ) . '&#160;' .
+                       Xml::dateMenu( ( $year == null ? date( "Y" ) : $year ), $month ) . '&#160;' .
                        ( $tagSelector ? ( implode( '&#160;', $tagSelector ) . '&#160;' ) : '' ) .
                        $checkDeleted .
                        Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n" .