$text =
$this->getMediaWikiCredits() .
$this->softwareInformation() .
- $this->extensionCredits();
+ $this->getExtensionCredits();
if ( $wgSpecialVersionShowHooks ) {
$text .= $this->getWgHooks();
}
*
* @return String: Wikitext
*/
- function extensionCredits() {
+ function getExtensionCredits() {
global $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunctions;
- if ( ! count( $wgExtensionCredits ) && ! count( $wgExtensionFunctions ) && ! count( $wgSkinExtensionFunctions ) )
+ if ( !count( $wgExtensionCredits ) && !count( $wgExtensionFunctions ) && !count( $wgSkinExtensionFunctions ) ) {
return '';
+ }
$extensionTypes = array(
'specialpage' => wfMsg( 'version-specialpages' ),
'media' => wfMsg( 'version-mediahandlers' ),
'other' => wfMsg( 'version-other' ),
);
+
wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) );
$out = Xml::element( 'h2', array( 'id' => 'mw-version-ext' ), wfMsg( 'version-extensions' ) ) .
usort( $wgExtensionCredits[$type], array( $this, 'compare' ) );
foreach ( $wgExtensionCredits[$type] as $extension ) {
- $out .= $this->formatCredits( $extension );
+ $out .= $this->getCreditsForExtension( $extension );
}
}
}
}
}
- function formatCredits( $extension ) {
+ /**
+ * Creates and formats the creidts for a single extension and returns this.
+ *
+ * @param $extension String
+ *
+ * @return string
+ */
+ function getCreditsForExtension( $extension ) {
$name = isset( $extension['name'] ) ? $extension['name'] : '[no name]';
if ( isset( $extension['path'] ) ) {