Index: trunk/phase3/includes/specials/SpecialVersion.php |
— | — | @@ -198,6 +198,24 @@ |
199 | 199 | } |
200 | 200 | |
201 | 201 | /** |
| 202 | + * Returns an array with the base extension types. |
| 203 | + * Type is stored as array key, the message as array value. |
| 204 | + * |
| 205 | + * @since 1.17 |
| 206 | + * |
| 207 | + * @return array |
| 208 | + */ |
| 209 | + public static function getBaseExtensionTypes() { |
| 210 | + return array( |
| 211 | + 'specialpage' => wfMsg( 'version-specialpages' ), |
| 212 | + 'parserhook' => wfMsg( 'version-parserhooks' ), |
| 213 | + 'variable' => wfMsg( 'version-variables' ), |
| 214 | + 'media' => wfMsg( 'version-mediahandlers' ), |
| 215 | + 'other' => wfMsg( 'version-other' ), |
| 216 | + ); |
| 217 | + } |
| 218 | + |
| 219 | + /** |
202 | 220 | * Generate wikitext showing extensions name, URL, author and description. |
203 | 221 | * |
204 | 222 | * @return String: Wikitext |
— | — | @@ -209,13 +227,7 @@ |
210 | 228 | return ''; |
211 | 229 | } |
212 | 230 | |
213 | | - $extensionTypes = array( |
214 | | - 'specialpage' => wfMsg( 'version-specialpages' ), |
215 | | - 'parserhook' => wfMsg( 'version-parserhooks' ), |
216 | | - 'variable' => wfMsg( 'version-variables' ), |
217 | | - 'media' => wfMsg( 'version-mediahandlers' ), |
218 | | - 'other' => wfMsg( 'version-other' ), |
219 | | - ); |
| 231 | + $extensionTypes = self::getBaseExtensionTypes(); |
220 | 232 | |
221 | 233 | wfRunHooks( 'SpecialVersionExtensionTypes', array( &$this, &$extensionTypes ) ); |
222 | 234 | |