Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | $text = |
58 | 58 | $this->getMediaWikiCredits() . |
59 | 59 | $this->softwareInformation() . |
60 | | - $this->extensionCredits(); |
| 60 | + $this->getExtensionCredits(); |
61 | 61 | if ( $wgSpecialVersionShowHooks ) { |
62 | 62 | $text .= $this->getWgHooks(); |
63 | 63 | } |
— | — | @@ -204,11 +204,12 @@ |
205 | 205 | * |
206 | 206 | * @return String: Wikitext |
207 | 207 | */ |
208 | | - function extensionCredits() { |
| 208 | + function getExtensionCredits() { |
209 | 209 | global $wgExtensionCredits, $wgExtensionFunctions, $wgParser, $wgSkinExtensionFunctions; |
210 | 210 | |
211 | | - if ( ! count( $wgExtensionCredits ) && ! count( $wgExtensionFunctions ) && ! count( $wgSkinExtensionFunctions ) ) |
| 211 | + if ( !count( $wgExtensionCredits ) && !count( $wgExtensionFunctions ) && !count( $wgSkinExtensionFunctions ) ) { |
212 | 212 | return ''; |
| 213 | + } |
213 | 214 | |
214 | 215 | $extensionTypes = array( |
215 | 216 | 'specialpage' => wfMsg( 'version-specialpages' ), |
— | — | @@ -217,6 +218,7 @@ |
218 | 219 | 'media' => wfMsg( 'version-mediahandlers' ), |
219 | 220 | 'other' => wfMsg( 'version-other' ), |
220 | 221 | ); |
| 222 | + |
221 | 223 | wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) ); |
222 | 224 | |
223 | 225 | $out = Xml::element( 'h2', array( 'id' => 'mw-version-ext' ), wfMsg( 'version-extensions' ) ) . |
— | — | @@ -229,7 +231,7 @@ |
230 | 232 | usort( $wgExtensionCredits[$type], array( $this, 'compare' ) ); |
231 | 233 | |
232 | 234 | foreach ( $wgExtensionCredits[$type] as $extension ) { |
233 | | - $out .= $this->formatCredits( $extension ); |
| 235 | + $out .= $this->getCreditsForExtension( $extension ); |
234 | 236 | } |
235 | 237 | } |
236 | 238 | } |
— | — | @@ -275,7 +277,14 @@ |
276 | 278 | } |
277 | 279 | } |
278 | 280 | |
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 ) { |
280 | 289 | $name = isset( $extension['name'] ) ? $extension['name'] : '[no name]'; |
281 | 290 | |
282 | 291 | if ( isset( $extension['path'] ) ) { |