From: Ævar Arnfjörð Bjarmason Date: Tue, 12 Jul 2005 23:42:11 +0000 (+0000) Subject: * Added a new array for extensions to use, $wgExtensionCredits, see X-Git-Tag: 1.5.0beta4~151 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=3b80f511afac52df29896ee462888b51c8a8543f;p=lhc%2Fweb%2Fwiklou.git * Added a new array for extensions to use, $wgExtensionCredits, see documentation in DefaultSettings.php --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e123409e7e..f1e123906b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -563,9 +563,10 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new. * (bug 655) Provide empty search form when searching for nothing * (bug 2802) Display more than one character of the sort key * Nynorsk numeric format fix +* Added a new array for extensions to use, $wgExtensionCredits, see + documentation in DefaultSettings.php * (bug 2825) Fix regression in newtalk notifications for anons w/ enotif off - === Caveats === Some output, particularly involving user-supplied inline HTML, may not diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0beccfb39e..37be6f2e76 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1225,6 +1225,20 @@ $wgUseXMLparser = false ; /** Extensions */ $wgSkinExtensionFunctions = array(); $wgExtensionFunctions = array(); +/** + * An array of extension types, their authors, url and name, add to it from + * an extension like: + * + * + * $wgExtensionCredits[$type][] = array( + * 'name' => 'Example extension', + * 'author' => 'Foo Barstein', + * 'url' => 'http://wwww.example.com/Example%20Extension/', + * ); + * + * Where $type is 'specialpage', 'parserhook', or 'other'. + */ +$wgExtensionCredits = array(); /** * Allow user Javascript page? diff --git a/includes/SpecialVersion.php b/includes/SpecialVersion.php index 3fa221f479..47090927d6 100644 --- a/includes/SpecialVersion.php +++ b/includes/SpecialVersion.php @@ -10,11 +10,11 @@ * constructor */ function wfSpecialVersion() { - global $wgOut, $wgVersion; + global $wgOut, $wgVersion, $wgExtensionCredits; $dbr =& wfGetDB( DB_SLAVE ); - $wgOut->addWikiText( " + $out = "
This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''', copyright (C) 2001-2005 Magnus Manske, Brion Vibber, Lee Daniel Crocker, @@ -38,6 +38,27 @@ or [http://www.gnu.org/copyleft/gpl.html read it online] * [http://www.mediawiki.org/ MediaWiki]: $wgVersion * [http://www.php.net/ PHP]: " . phpversion() . " (" . php_sapi_name() . ") * " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion() . " -
" ); + +"; + if ( count( $wgExtensionCredits ) > 0 ) { + $extensionTypes = array( + 'specialpage' => 'Special pages', + 'parserhook' => 'Parser hooks', + 'other' => 'Other' + ); + + $out .= "== Extensions ==\n"; + + foreach ( $extensionTypes as $type => $text ) { + if ( count( @$wgExtensionCredits[$type] ) > 0 ) { + $out .= "=== $text ===\n"; + foreach ( $wgExtensionCredits[$type] as $extension ) { + $out .= '* [' . $extension['url'] . ' ' . $extension['name'] . '] by ' . $extension['author'] . "\n"; + } + } + + } + } + $wgOut->addWikiText( $out ); } ?>