Bug: T193364
Change-Id: Ic2dbc961f7eebad11da53724b9cce2f804ffad39
* to the standard "**<duration>|<displayname>" format?
* @param Language|null $lang The language to get the durations in, or null to use
* the wiki's content language
* to the standard "**<duration>|<displayname>" format?
* @param Language|null $lang The language to get the durations in, or null to use
* the wiki's content language
+ * @param bool $includeOther Whether to include the 'other' option in the list of
+ * suggestions
- public static function getSuggestedDurations( $lang = null ) {
+ public static function getSuggestedDurations( $lang = null, $includeOther = true ) {
$a = [];
$msg = $lang === null
? wfMessage( 'ipboptions' )->inContentLanguage()->text()
$a = [];
$msg = $lang === null
? wfMessage( 'ipboptions' )->inContentLanguage()->text()
+ if ( $a && $includeOther ) {
// if options exist, add other to the end instead of the begining (which
// is what happens by default).
$a[ wfMessage( 'ipbother' )->text() ] = 'other';
// if options exist, add other to the end instead of the begining (which
// is what happens by default).
$a[ wfMessage( 'ipbother' )->text() ] = 'other';