* constructor
*/
function wfSpecialVersion() {
- global $wgOut, $wgVersion, $wgScriptPath;
+ global $wgOut, $wgVersion, $wgExtensionCredits;
$dbr =& wfGetDB( DB_SLAVE );
- $wgOut->addWikiText( "
+ $out = "
+<div dir='ltr'>
This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''',
copyright (C) 2001-2005 Magnus Manske, Brion Vibber, Lee Daniel Crocker,
Tim Starling, Erik Möller, and others.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-You should have received [{{SERVER}}$wgScriptPath/COPYING a copy of the GNU General Public License]
+You should have received [{{SERVER}}{{SCRIPTPATH}}/COPYING a copy of the GNU General Public License]
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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()
- );
+* " . $dbr->getSoftwareLink() . ": " . $dbr->getServerVersion() . "
+</div>
+";
+ 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 .= formatExtensionCredits( $extension['name'], $extension['author'], @$extension['url'], @$extension['version'] );
+ }
+ }
+
+ }
+ }
+ $wgOut->addWikiText( $out );
+}
+
+function formatExtensionCredits( $name, $author, $url = null, $version = null ) {
+ $ret = '* ';
+ if ( isset( $url ) )
+ $ret .= "[$url ";
+ $ret .= $name;
+ if ( isset( $url ) )
+ $ret .= ']';
+ if ( isset( $version ) )
+ $ret .= " $version";
+ $ret .= " by $author\n";
+ return $ret;
}
?>