Index: trunk/extensions/Awesomeness/Awesomeness.php |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * Initialization file for the Awesomeness extension. |
6 | 5 | * |
— | — | @@ -17,27 +16,19 @@ |
18 | 17 | |
19 | 18 | define( 'Awesomeness_VERSION', 'of awesomeness' ); |
20 | 19 | |
21 | | -$wgExtensionFunctions[] = 'efAwesomenessSetup'; |
| 20 | +$wgExtensionCredits['other'][] = array( |
| 21 | + 'path' => __FILE__, |
| 22 | + 'name' => 'Awesomeness', |
| 23 | + 'version' => Awesomeness_VERSION, |
| 24 | + 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), |
| 25 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Awesomeness', |
| 26 | + 'descriptionmsg' => 'awesomeness-desc', |
| 27 | +); |
22 | 28 | |
23 | 29 | $wgExtensionMessagesFiles['Awesomeness'] = dirname( __FILE__ ) . '/Awesomeness.i18n.php'; |
24 | 30 | |
25 | 31 | $wgHooks['ArticleSave'][] = 'efAwesomenessInsertion'; |
26 | 32 | |
27 | | -function efAwesomenessSetup() { |
28 | | - global $wgExtensionCredits; |
29 | | - |
30 | | - wfLoadExtensionMessages( 'Awesomeness' ); |
31 | | - |
32 | | - $wgExtensionCredits['other'][] = array( |
33 | | - 'path' => __FILE__, |
34 | | - 'name' => wfMsg( 'awesomeness' ), |
35 | | - 'version' => Awesomeness_VERSION, |
36 | | - 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]' ), |
37 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Awesomeness', |
38 | | - 'description' => wfMsg( 'awesomeness-desc' ), |
39 | | - ); |
40 | | -} |
41 | | - |
42 | 33 | function efAwesomenessInsertion( &$article, &$user, &$text, &$summary, $minor, $watch, $sectionanchor, &$flags ) { |
43 | 34 | $awesomeness = array( 'awesomeness', 'awesome' ); |
44 | 35 | |
— | — | @@ -45,6 +36,6 @@ |
46 | 37 | $awesome = wfMsg( $awesome ); |
47 | 38 | $text = preg_replace( "/(^|\s|-)({$awesome}[\?!\.\,]?)(\s|$)/i", " '''$2''' ", $text ); |
48 | 39 | } |
49 | | - |
| 40 | + |
50 | 41 | return true; |
51 | 42 | } |
\ No newline at end of file |
Index: trunk/extensions/Awesomeness/Awesomeness.i18n.php |
— | — | @@ -1,5 +1,4 @@ |
2 | 2 | <?php |
3 | | - |
4 | 3 | /** |
5 | 4 | * Internationalization file for the Awesomeness extension. |
6 | 5 | * |
— | — | @@ -16,6 +15,6 @@ |
17 | 16 | */ |
18 | 17 | $messages['en'] = array( |
19 | 18 | 'awesomeness' => 'Awesomeness', |
20 | | - 'awesomeness-desc' => 'Makes your wiki more awesome.', |
| 19 | + 'awesomeness-desc' => 'Makes your wiki more awesome', |
21 | 20 | 'awesome' => 'Awesome' |
22 | | -); |
\ No newline at end of file |
| 21 | +); |