* Special:AllPages: Move hardcoded styles from code to CSS
* (bug 6092) Add parser function equivalents of {{REVISIONID}},
{{REVISIONTIMESTAMP}} (and friends) and {{REVISIONUSER}} magic words
+* (bug 18529) New hook: SoftwareInfo for adding information about the software
+ to Special:Version
=== Bug fixes in 1.15 ===
* (bug 16968) Special:Upload no longer throws useless warnings.
'SkinTemplateToolboxEnd': Called by SkinTemplate skins after toolbox links have been rendered (useful for adding more)
$tools: array of tools
+'SoftwareInfo': Called by Special:Version for returning information about the software
+$software: The array of software in format 'name' => 'version'. See SpecialVersion::softwareInformation()
+
'SpecialContributionsBeforeMainOutput': Before the form on Special:Contributions
$id: User identifier
static function softwareInformation() {
$dbr = wfGetDB( DB_SLAVE );
- return Xml::element( 'h2', array( 'id' => 'mw-version-software' ), wfMsg( 'version-software' ) ) .
- Xml::openElement( 'table', array( 'id' => 'sv-software' ) ) .
+ // Put the software in an array of form 'name' => 'version'. All messages should
+ // be loaded here, so feel free to use wfMsg*() in the 'name'. Raw HTML or wikimarkup
+ // can be used
+ $software = array();
+ $software['[http://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
+ $software['[http://www.php.net/ PHP]'] = phpversion() . " (" . php_sapi_name() . ")";
+ $software[$dbr->getSoftwareLink()] = $dbr->getServerVersion();
+
+ // Allow a hook to add/remove items
+ wfRunHooks( 'SoftwareInfo', array( &$software ) );
+
+ $out = Xml::element( 'h2', array( 'id' => 'mw-version-software' ), wfMsg( 'version-software' ) ) .
+ Xml::openElement( 'table', array( 'id' => 'sv-software' ) ) .
"<tr>
<th>" . wfMsg( 'version-software-product' ) . "</th>
<th>" . wfMsg( 'version-software-version' ) . "</th>
- </tr>\n
- <tr>
- <td>[http://www.mediawiki.org/ MediaWiki]</td>
- <td>" . self::getVersionLinked() . "</td>
- </tr>\n
- <tr>
- <td>[http://www.php.net/ PHP]</td>
- <td>" . phpversion() . " (" . php_sapi_name() . ")</td>
- </tr>\n
- <tr>
- <td>" . $dbr->getSoftwareLink() . "</td>
- <td>" . $dbr->getServerVersion() . "</td>
- </tr>\n" .
- Xml::closeElement( 'table' );
+ </tr>\n";
+ foreach( $software as $name => $version ) {
+ $out .= "<tr>
+ <td>" . $name . "</td>
+ <td>" . $version . "</td>
+ </tr>\n";
+ }
+ return $out . Xml::closeElement( 'table' );
}
/**