}
/**
- * @param int $year
- * @param int $month
+ * @param int|string $year Use '' or 0 to start with no year preselected.
+ * @param int|string $month A month in the 1..12 range. Use '', 0 or -1 to start with no month
+ * preselected.
* @return string Formatted HTML
*/
public static function dateMenu( $year, $month ) {
// a custom language code might not have a defined name...
if ( !array_key_exists( $wgLanguageCode, $languages ) ) {
$languages[$wgLanguageCode] = $wgLanguageCode;
+ // Sort the array again
+ ksort( $languages );
}
- ksort( $languages );
-
/**
* If a bogus value is set, default to the content language.
* Otherwise, no default is selected and the user ends up