http://www.mediawiki.org/wiki/Special:Code/MediaWiki/62057
Revision: 62057 Author: avar Date: 2010-02-06 01:50:30 +0000 (Sat, 06 Feb 2010) Log Message: ----------- Fix regression introduced in r30117: Don's sort() the author list in Special:Version When extensions specify a list of authors they expect them to appear in Special:Version as they're specified. Sorting lists on Special:Version as introduced in r30117 makes sense for things like the names of parser functions, but not authors. Some extensions give arrays like array("foo", "bar", "others") and expect output like "foo, bar and others". Sometimes (like in the case of Maps.php) this would only incidentally work. Furthermore in some cases the first author in the array indicates the primary author, this is the case with CheckUser.php and other similar extensions with multiple authors. Modified Paths: -------------- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/specials/SpecialVersion.php Modified: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES 2010-02-06 01:06:03 UTC (rev 62056) +++ trunk/phase3/RELEASE-NOTES 2010-02-06 01:50:30 UTC (rev 62057) @@ -741,6 +741,10 @@ * (bug 21593) Special:UserRights now lists automatic groups membership * (bug 22364) Setting $wgUseExternalEditor to false no longer hides the reupload link from file pages +* Fix bug introduced in MediaWiki 1.12: The author field in + $wgExtensionCredits is no longer sorted with sort() but rather used + as it appears in extensions as was the case before r30117 where it + was unintentionally sorted along with other fields. == API changes in 1.16 == Modified: trunk/phase3/includes/specials/SpecialVersion.php =================================================================== --- trunk/phase3/includes/specials/SpecialVersion.php 2010-02-06 01:06:03 UTC (rev 62056) +++ trunk/phase3/includes/specials/SpecialVersion.php 2010-02-06 01:50:30 UTC (rev 62057) @@ -307,7 +307,7 @@ } $author = isset ( $extension['author'] ) ? $extension['author'] : array(); $extDescAuthor = "<td>$description</td> - <td>" . $this->listToText( (array)$author ) . "</td> + <td>" . $this->listToText( (array)$author, false ) . "</td> </tr>\n"; return $extNameVer . $extDescAuthor; } @@ -369,9 +369,10 @@ /** * @param array $list + * @param bool $sort * @return string */ - function listToText( $list ) { + function listToText( $list, $sort = true ) { $cnt = count( $list ); if ( $cnt == 1 ) { @@ -381,7 +382,9 @@ return ''; } else { global $wgLang; - sort( $list ); + if ( $sort ) { + sort( $list ); + } return $wgLang->listToText( array_map( array( __CLASS__, 'arrayToString' ), $list ) ); } } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs