Extend ... magic to also work when "others" is linked somewhere
authorjeroendedauw <jeroendedauw@gmail.com>
Wed, 6 Feb 2013 10:53:10 +0000 (11:53 +0100)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 26 Feb 2013 10:28:56 +0000 (10:28 +0000)
Change-Id: I8c6657c95061b066ed48f115e771889a507bd268

RELEASE-NOTES-1.21
includes/DefaultSettings.php
includes/specials/SpecialVersion.php

index 2db9153..51259de 100644 (file)
@@ -85,6 +85,8 @@ production.
   in MW 1.20 (saving preferences using Special:Preferences cleared any
   additional fields) and which has been disabled in 1.20.1 as a part of
   a security fix (bug 42202).
+* Added option to specify "others" as author in extension credits using
+  "..." as author name.
 * Added the ability to limit the wall clock time used by shell processes,
   as well as the CPU time. Configurable with $wgMaxShellWallClockTime.
 * Allow memory of shell subprocesses to be limited using Linux cgroups
index 731c1a1..e33c6c0 100644 (file)
@@ -5464,6 +5464,11 @@ $wgAutoloadClasses = array();
  * Where $type is 'specialpage', 'parserhook', 'variable', 'media' or 'other'.
  * Where 'descriptionmsg' can be an array with message key and parameters:
  * 'descriptionmsg' => array( 'exampleextension-desc', param1, param2, ... ),
+ *
+ * author can be a string or an array of strings. Authors can be linked using
+ * the regular wikitext link syntax. To have an internationalized version of
+ * "and others" show, add an element "...". This element can also be linked,
+ * for instance "[http://example ...]".
  */
 $wgExtensionCredits = array();
 
index 88d647e..f847ca3 100644 (file)
@@ -606,8 +606,10 @@ class SpecialVersion extends SpecialPage {
        function listAuthors( $authors ) {
                $list = array();
                foreach( (array)$authors as $item ) {
-                       if( $item == '...' ) {
+                       if ( $item == '...' ) {
                                $list[] = $this->msg( 'version-poweredby-others' )->text();
+                       } elseif ( substr( $item, -5 ) == ' ...]' ) {
+                               $list[] = substr( $item, 0, -4 ) . $this->msg( 'version-poweredby-others' )->text() . "]";
                        } else {
                                $list[] = $item;
                        }