Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php
- index b04f1ef..8645ef4 100644
- --- a/includes/specials/SpecialVersion.php
- +++ b/includes/specials/SpecialVersion.php
- @@ -619,12 +619,13 @@ class SpecialVersion extends SpecialPage {
- /**
- * Convert an array of items into a list for display.
- *
- - * @param $list Array of elements to display
- + * @param $ilist Array of elements to display
- * @param $sort Boolean: whether to sort the items in $list
- *
- * @return String
- */
- - function listToText( $list, $sort = true ) {
- + function listToText( $ilist, $sort = true ) {
- + $list = array_filter( $ilist, function( $entry ) { return !$entry instanceof Closure; } );
- $cnt = count( $list );
- if ( $cnt == 1 ) {
- @@ -636,6 +637,10 @@ class SpecialVersion extends SpecialPage {
- if ( $sort ) {
- sort( $list );
- }
- + $closureCount = count( array_filter( $ilist, function( $entry ) { return $entry instanceof Closure; } ) );
- + if ( $closureCount ) {
- + $list[] = wfMessage( 'version-extension-functions-anonymous', $closureCount )->text();
- + }
- return $this->getLanguage()->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) );
- }
- }
- diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php
- index d3f1327..6f95c59 100644
- --- a/languages/messages/MessagesEn.php
- +++ b/languages/messages/MessagesEn.php
- @@ -4727,6 +4727,7 @@ You can also [[Special:EditWatchlist|use the standard editor]].',
- 'version-mediahandlers' => 'Media handlers',
- 'version-hooks' => 'Hooks',
- 'version-extension-functions' => 'Extension functions',
- +'version-extension-functions-anonymous' => '$1 anonymous {{PLURAL:$1|function|functions}}',
- 'version-parser-extensiontags' => 'Parser extension tags',
- 'version-parser-function-hooks' => 'Parser function hooks',
- 'version-hook-name' => 'Hook name',
- diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php
- index 8c26034..9b48998 100644
- --- a/languages/messages/MessagesQqq.php
- +++ b/languages/messages/MessagesQqq.php
- @@ -8243,6 +8243,7 @@ This message is followed by the list of SPAM prevention extensions.',
- There are no such extensions here, so look at [[wikipedia:Special:Version]] for an example.',
- 'version-hooks' => 'Shown in [[Special:Version]]',
- 'version-extension-functions' => 'Shown in [[Special:Version]]',
- +'version-extension-functions-anonymous' => 'Shown in [[Special:Version]] under extension functions to represent functions which do not have names.',
- 'version-parser-extensiontags' => 'Part of [[Special:Version]].
- This message is followed by the list of parser extension tags like <code><nowiki><charinsert></nowiki></code>, <code><nowiki><coordinates></nowiki></code>, etc.',
- 'version-parser-function-hooks' => 'Shown in [[Special:Version]]',
- diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc
- index e2997c4..7e74bfe 100644
- --- a/maintenance/language/messages.inc
- +++ b/maintenance/language/messages.inc
- @@ -3588,6 +3588,7 @@ $wgMessageStructure = array(
- 'version-mediahandlers',
- 'version-hooks',
- 'version-extension-functions',
- + 'version-extension-functions-anonymous',
- 'version-parser-extensiontags',
- 'version-parser-function-hooks',
- 'version-hook-name',
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement