* (bug 27083) Extension info for Special:Version can include '...' as a special value which is turned into the localized 'others' used for Special:Version author lists.
This commit is contained in:
parent
56a62b9c7b
commit
fbbdd9edd9
1 changed files with 19 additions and 1 deletions
|
|
@ -445,7 +445,7 @@ class SpecialVersion extends SpecialPage {
|
|||
|
||||
$author = isset ( $extension['author'] ) ? $extension['author'] : array();
|
||||
$extDescAuthor = "<td>$description</td>
|
||||
<td>" . $this->listToText( (array)$author, false ) . "</td>
|
||||
<td>" . $this->listAuthors( $author, false ) . "</td>
|
||||
</tr>\n";
|
||||
|
||||
return $extNameVer . $extDescAuthor;
|
||||
|
|
@ -512,6 +512,24 @@ class SpecialVersion extends SpecialPage {
|
|||
"<span style='display:none'>visited from $ip</span>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a formatted unsorted list of authors
|
||||
*
|
||||
* @param $authors mixed: string or array of strings
|
||||
* @return String: HTML fragment
|
||||
*/
|
||||
function listAuthors( $authors ) {
|
||||
$list = array();
|
||||
foreach( (array)$authors as $item ) {
|
||||
if( $item == '...' ) {
|
||||
$list[] = wfMsg( 'version-poweredby-others' );
|
||||
} else {
|
||||
$list[] = $item;
|
||||
}
|
||||
}
|
||||
return $this->listToText( $list, false );
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an array of items into a list for display.
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue