* (bug 27083) Extension info for Special:Version can include '...' as a special value...
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 5 Feb 2011 00:58:07 +0000 (00:58 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 5 Feb 2011 00:58:07 +0000 (00:58 +0000)
includes/specials/SpecialVersion.php

index 3118f65..cf78161 100644 (file)
@@ -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.
         *