r70317 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70316‎ | r70317 | r70318 >
Date:04:41, 2 August 2010
Author:jeroendedauw
Status:ok
Tags:
Comment:
Follow up to r70313
Modified paths:
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -56,7 +56,7 @@
5757 $text =
5858 $this->getMediaWikiCredits() .
5959 $this->softwareInformation() .
60 - $this->extensionCredits();
 60+ $this->getExtensionCredits();
6161 if ( $wgSpecialVersionShowHooks ) {
6262 $text .= $this->getWgHooks();
6363 }
@@ -204,11 +204,12 @@
205205 *
206206 * @return String: Wikitext
207207 */
208 - function extensionCredits() {
 208+ function getExtensionCredits() {
209209 global $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunctions;
210210
211 - if ( ! count( $wgExtensionCredits ) && ! count( $wgExtensionFunctions ) && ! count( $wgSkinExtensionFunctions ) )
 211+ if ( !count( $wgExtensionCredits ) && !count( $wgExtensionFunctions ) && !count( $wgSkinExtensionFunctions ) ) {
212212 return '';
 213+ }
213214
214215 $extensionTypes = array(
215216 'specialpage' => wfMsg( 'version-specialpages' ),
@@ -217,6 +218,7 @@
218219 'media' => wfMsg( 'version-mediahandlers' ),
219220 'other' => wfMsg( 'version-other' ),
220221 );
 222+
221223 wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) );
222224
223225 $out = Xml::element( 'h2', array( 'id' => 'mw-version-ext' ), wfMsg( 'version-extensions' ) ) .
@@ -229,7 +231,7 @@
230232 usort( $wgExtensionCredits[$type], array( $this, 'compare' ) );
231233
232234 foreach ( $wgExtensionCredits[$type] as $extension ) {
233 - $out .= $this->formatCredits( $extension );
 235+ $out .= $this->getCreditsForExtension( $extension );
234236 }
235237 }
236238 }
@@ -275,7 +277,14 @@
276278 }
277279 }
278280
279 - function formatCredits( $extension ) {
 281+ /**
 282+ * Creates and formats the creidts for a single extension and returns this.
 283+ *
 284+ * @param $extension String
 285+ *
 286+ * @return string
 287+ */
 288+ function getCreditsForExtension( $extension ) {
280289 $name = isset( $extension['name'] ) ? $extension['name'] : '[no name]';
281290
282291 if ( isset( $extension['path'] ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70313Documentation and style improvementsjeroendedauw03:44, 2 August 2010

Status & tagging log