r84325 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84324‎ | r84325 | r84326 >
Date:13:16, 19 March 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Removed some useless extension functions (and one unused global)
Modified paths:
  • /trunk/extensions/Imagetabs/Imagetabs.php (modified) (history)
  • /trunk/extensions/Interlanguage/InterlanguageCentral.php (modified) (history)
  • /trunk/extensions/LatexDoc/LatexDoc.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LatexDoc/LatexDoc.php
@@ -13,7 +13,6 @@
1414 'descriptionmsg' => 'latexdoc-desc',
1515 );
1616
17 -$wgExtensionFunctions[] = 'wfLatexDocInit';
1817 $dir = dirname(__FILE__) . '/';
1918 $wgExtensionMessagesFiles['LatexDoc'] = $dir . 'LatexDoc.i18n.php';
2019
@@ -153,9 +152,5 @@
154153
155154 $wgLatexDoc = new LatexDoc;
156155
157 -function wfLatexDocInit() {
158 - global $wgHooks, $wgLatexDoc;
159 - wfLoadExtensionMessages( 'LatexDoc' );
160 - $wgHooks['UnknownAction'][] = &$wgLatexDoc;
161 - $wgHooks['ParserBeforeStrip'][] = &$wgLatexDoc;
162 -}
 156+$wgHooks['UnknownAction'][] = &$wgLatexDoc;
 157+$wgHooks['ParserBeforeStrip'][] = &$wgLatexDoc;
Index: trunk/extensions/Interlanguage/InterlanguageCentral.php
@@ -23,7 +23,6 @@
2424 * @see http://www.mediawiki.org/wiki/Extension:Interlanguage
2525 */
2626
27 -$wgExtensionFunctions[]="wfInterlanguageCentralExtension";
2827 $wgJobClasses['purgeDependentWikis'] = 'InterlanguageCentralExtensionPurgeJob';
2928 $wgExtensionCredits['parserhook'][] = array(
3029 'name' => 'Interlanguage Central',
@@ -33,15 +32,11 @@
3433 'descriptionmsg' => 'interlanguagecentral-desc',
3534 );
3635 $wgExtensionMessagesFiles['Interlanguagecentral'] = dirname(__FILE__) . '/InterlanguageCentral.i18n.php';
37 -
38 -function wfInterlanguageCentralExtension() {
39 - global $wgHooks, $wgInterlanguageCentralExtension;
4036
41 - $wgInterlanguageCentralExtension = new InterlanguageCentralExtension();
42 - $wgHooks['ArticleSave'][] = $wgInterlanguageCentralExtension;
43 - $wgHooks['ArticleSaveComplete'][] = $wgInterlanguageCentralExtension;
44 - //TODO: ArticleDelete etc.
45 -}
 37+$wgInterlanguageCentralExtension = new InterlanguageCentralExtension();
 38+$wgHooks['ArticleSave'][] = $wgInterlanguageCentralExtension;
 39+$wgHooks['ArticleSaveComplete'][] = $wgInterlanguageCentralExtension;
 40+//TODO: ArticleDelete etc.
4641
4742 class InterlanguageCentralExtension {
4843 //ILL = InterLanguageLinks
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -54,7 +54,7 @@
5555 }
5656 function mvSetupExtension() {
5757 global $mvVersion, $mvNamespace, $mvgIP, $wgHooks, $wgExtensionCredits, $mvMasterStore,
58 - $wgParser, $mvArticlePath, $mvgScriptPath, $wgServer, $wgExtensionFunctions, $markerList,$wgVersion,
 58+ $wgParser, $mvArticlePath, $mvgScriptPath, $wgServer, $markerList, $wgVersion,
5959 $wgAjaxExportList, $mvEnableAutoComplete, $mvEnableJSMVDrewrite,
6060 $wgAutoloadClasses, $wgSpecialPages, $wgMediaHandlers, $wgJSAutoloadClasses,
6161 $wgAPIModules;
Index: trunk/extensions/Imagetabs/Imagetabs.php
@@ -16,7 +16,6 @@
1717 *
1818 */
1919
20 -$wgExtensionFunctions[] = 'createImageTabs_setup';
2120 $wgExtensionCredits['other'][] = array(
2221 'path' => __FILE__,
2322 'name' => 'Imagetabs',
@@ -26,10 +25,7 @@
2726 'url' => 'http://www.mediawiki.org/wiki/Extension:Imagetabs'
2827 );
2928
30 -function createImageTabs_setup() {
31 - global $wgHooks;
32 - $wgHooks['SkinTemplateContentActions'][] = 'createImageTabs_hook';
33 -}
 29+$wgHooks['SkinTemplateContentActions'][] = 'createImageTabs_hook';
3430
3531 function createImageTabs_hook(&$content_actions) {
3632 global $wgEnableInterwikiImageTabs, $wgInterwikiImageTabs, $wgTitle, $wgLocalInterwiki;

Comments

#Comment by Aaron Schulz (talk | contribs)   21:36, 17 June 2011

You removed wfLoadExtensionMessages(), is that OK with the author and b/c?

Status & tagging log