jenkins-bot has submitted this change and it was merged.

Change subject: Extend ... magic to also work when "others" is linked somewhere
......................................................................


Extend ... magic to also work when "others" is linked somewhere

Change-Id: I8c6657c95061b066ed48f115e771889a507bd268
---
M RELEASE-NOTES-1.21
M includes/DefaultSettings.php
M includes/specials/SpecialVersion.php
3 files changed, 10 insertions(+), 1 deletion(-)

Approvals:
  IAlex: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 2db9153..51259de 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -85,6 +85,8 @@
   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
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 731c1a1..e33c6c0 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5464,6 +5464,11 @@
  * 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();
 
diff --git a/includes/specials/SpecialVersion.php 
b/includes/specials/SpecialVersion.php
index 88d647e..f847ca3 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -606,8 +606,10 @@
        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;
                        }

-- 
To view, visit https://gerrit.wikimedia.org/r/47719
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c6657c95061b066ed48f115e771889a507bd268
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: IAlex <ialex.w...@gmail.com>
Gerrit-Reviewer: Jeroen De Dauw <jeroended...@gmail.com>
Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com>
Gerrit-Reviewer: Platonides <platoni...@gmail.com>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to