r47864 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47863‎ | r47864 | r47865 >
Date:15:15, 27 February 2009
Author:demon
Status:deferred
Tags:
Comment:
Just call $wgHooks directly, rather than using an unnecessary setup function.
Modified paths:
  • /trunk/extensions/MinimumNameLength/MinimumNameLength.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MinimumNameLength/MinimumNameLength.php
@@ -28,17 +28,9 @@
2929 );
3030
3131 $wgExtensionMessagesFiles['MinimumNameLength'] = dirname(__FILE__) . '/MinimumNameLength.i18n.php';
32 -$wgExtensionFunctions[] = 'efMinimumNameLengthSetup';
 32+$wgHooks['AbortNewAccount'][] = 'efMinimumNameLength';
3333
3434 /**
35 - * Extension setup function
36 - */
37 -function efMinimumNameLengthSetup() {
38 - global $wgHooks;
39 - $wgHooks['AbortNewAccount'][] = 'efMinimumNameLength';
40 -}
41 -
42 -/**
4335 * Hooks account creation and checks the
4436 * username length, cancelling with an error
4537 * if the username is too short

Status & tagging log