r66027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66026‎ | r66027 | r66028 >
Date:17:33, 7 May 2010
Author:siebrand
Status:deferred
Tags:
Comment:
* remove unneeded $wgExtensionFunctions[] and fixup extension credits
Modified paths:
  • /trunk/extensions/Awesomeness/Awesomeness.i18n.php (modified) (history)
  • /trunk/extensions/Awesomeness/Awesomeness.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Awesomeness/Awesomeness.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Initialization file for the Awesomeness extension.
65 *
@@ -17,27 +16,19 @@
1817
1918 define( 'Awesomeness_VERSION', 'of awesomeness' );
2019
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+);
2228
2329 $wgExtensionMessagesFiles['Awesomeness'] = dirname( __FILE__ ) . '/Awesomeness.i18n.php';
2430
2531 $wgHooks['ArticleSave'][] = 'efAwesomenessInsertion';
2632
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 -
4233 function efAwesomenessInsertion( &$article, &$user, &$text, &$summary, $minor, $watch, $sectionanchor, &$flags ) {
4334 $awesomeness = array( 'awesomeness', 'awesome' );
4435
@@ -45,6 +36,6 @@
4637 $awesome = wfMsg( $awesome );
4738 $text = preg_replace( "/(^|\s|-)({$awesome}[\?!\.\,]?)(\s|$)/i", " '''$2''' ", $text );
4839 }
49 -
 40+
5041 return true;
5142 }
\ No newline at end of file
Index: trunk/extensions/Awesomeness/Awesomeness.i18n.php
@@ -1,5 +1,4 @@
22 <?php
3 -
43 /**
54 * Internationalization file for the Awesomeness extension.
65 *
@@ -16,6 +15,6 @@
1716 */
1817 $messages['en'] = array(
1918 'awesomeness' => 'Awesomeness',
20 - 'awesomeness-desc' => 'Makes your wiki more awesome.',
 19+ 'awesomeness-desc' => 'Makes your wiki more awesome',
2120 'awesome' => 'Awesome'
22 -);
\ No newline at end of file
 21+);

Status & tagging log