From: Marius Hoch Date: Tue, 23 Oct 2012 00:21:47 +0000 (+0200) Subject: (bug 40641) Implement Special:Version/Credits X-Git-Tag: 1.31.0-rc.0~21831 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=4c56eb3626209c343df77d9d68013e3ae2ae209f;p=lhc%2Fweb%2Fwiklou.git (bug 40641) Implement Special:Version/Credits I've implemented Special:Version/Credits to have a nice list of contributors, without having to download a file. The page takes it's data from the CREDITS file and parses it as wiki text. (As I was on it, I was so bold to add my name to the CREDITS) Change-Id: Ic956c303d57fdccfd214c2fcb78d04c6bd30449a --- diff --git a/CREDITS b/CREDITS index 68c945c96f..6555b07ccb 100644 --- a/CREDITS +++ b/CREDITS @@ -2,6 +2,7 @@ MediaWiki 1.21 is a collaborative project released under the GNU General Public License v2. We would like to recognize the following names for their contribution to the product. + == Developers == * Aaron Schulz * Alex Z. @@ -44,6 +45,7 @@ following names for their contribution to the product. * Leon Weber * Leslie Hoare * Marco Schuster +* Marius Hoch * Matěj Grabovský * Matt Johnston * Max Semenik @@ -206,4 +208,4 @@ following names for their contribution to the product. * Meno25 * Rotem Liss * Shinjiman -* Translatewiki.net Translators https://translatewiki.net/wiki/Special:ListUsers/translator +* [https://translatewiki.net/wiki/Special:ListUsers/translator Translatewiki.net Translators] diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index d8314a3abd..7b9e101d4d 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -34,6 +34,7 @@ production. * Added ApiQueryORM class to facilitate creation of query API modules based on tables that have a corresponding ORMTable class. * (bug 40876) Icon for PSD (Adobe Photoshop) file types. +* (bug 40641) Implemented Special:Version/Credits with a list of contributors. === Bug fixes in 1.21 === * (bug 40353) SpecialDoubleRedirect should support interwiki redirects. diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 4e5b6bf5a3..87ea943b9c 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -48,29 +48,43 @@ class SpecialVersion extends SpecialPage { * main() */ public function execute( $par ) { - global $wgSpecialVersionShowHooks; + global $wgSpecialVersionShowHooks, $IP; $this->setHeaders(); $this->outputHeader(); $out = $this->getOutput(); $out->allowClickjacking(); - $text = - $this->getMediaWikiCredits() . - $this->softwareInformation() . - $this->getEntryPointInfo() . - $this->getExtensionCredits(); - if ( $wgSpecialVersionShowHooks ) { - $text .= $this->getWgHooks(); - } + if( $par !== 'Credits' ) { + $text = + $this->getMediaWikiCredits() . + $this->softwareInformation() . + $this->getEntryPointInfo() . + $this->getExtensionCredits(); + if ( $wgSpecialVersionShowHooks ) { + $text .= $this->getWgHooks(); + } - $out->addWikiText( $text ); - $out->addHTML( $this->IPInfo() ); + $out->addWikiText( $text ); + $out->addHTML( $this->IPInfo() ); - if ( $this->getRequest()->getVal( 'easteregg' ) ) { - if ( $this->showEasterEgg() ) { - // TODO: put something interesting here + if ( $this->getRequest()->getVal( 'easteregg' ) ) { + if ( $this->showEasterEgg() ) { + // TODO: put something interesting here + } } + } else { + // Credits sub page + + // Header + $out->addHTML( wfMessage( 'version-credits-summary' )->parseAsBlock() ); + + $wikiText = file_get_contents( $IP . '/CREDITS' ); + + // Take everything from the first section onwards, to remove the (not localized) header + $wikiText = substr( $wikiText, strpos( $wikiText, '==' ) ); + + $out->addWikiText( $wikiText ); } } @@ -109,9 +123,9 @@ class SpecialVersion extends SpecialPage { 'Roan Kattouw', 'Trevor Parscal', 'Bryan Tong Minh', 'Sam Reed', 'Victor Vasiliev', 'Rotem Liss', 'Platonides', 'Antoine Musso', 'Timo Tijhof', - '[{{SERVER}}{{SCRIPTPATH}}/CREDITS ' . + '[[Special:Version/Credits|' . wfMessage( 'version-poweredby-others' )->text() . - ']' + ']]' ); return wfMessage( 'version-poweredby-credits', date( 'Y' ), diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index a61ab822bc..b27cb18d9d 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4712,6 +4712,7 @@ You can also [[Special:EditWatchlist|use the standard editor]].', 'version-license' => 'License', 'version-poweredby-credits' => "This wiki is powered by '''[//www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.", 'version-poweredby-others' => 'others', +'version-credits-summary' => 'We would like to recognize the following persons for their contribution to [[Special:Version|MediaWiki]].', 'version-license-info' => 'MediaWiki is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. MediaWiki is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 82cf299869..581ac34ffd 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -4695,6 +4695,7 @@ This is being used in [[Special:Version]], preceeding the subversion revision nu *$1: the current year *$2: a list of selected MediaWiki authors', 'version-poweredby-others' => 'Used at the very end of {{msg-mw|version-poweredby-credits}} on [[Special:Version]]. First, there\'s a long list of selected MediaWiki authors, then the word "and" (from {{msg-mw|and}}) follows and then this translation, which is supposed to credit the many other people than developer helping with MediaWiki.', +'version-credits-summary' => 'Summary of the [[Special:Version/Credits]] sub page, which lists all developers etc. who contributed to MediaWiki. Shown at the top.', 'version-license-info' => '[[wikipedia:GNU GPL|GNU GPL]] notice shown at [[Special:Version]]. See //www.gnu.org/licenses/old-licenses/gpl-2.0-translations.html for available translations.', 'version-software-product' => 'Shown in [[Special:Version]]', 'version-software-version' => '{{Identical|Version}}', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 60e0f30e59..916edd9f06 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -3569,6 +3569,7 @@ $wgMessageStructure = array( 'version-license', 'version-poweredby-credits', 'version-poweredby-others', + 'version-credits-summary', 'version-license-info', 'version-software', 'version-software-product',