Index: trunk/extensions/Renameuser/SpecialRenameuser.php |
— | — | @@ -39,9 +39,9 @@ |
40 | 40 | define( 'RENAMEUSER_CONTRIBLIMIT', 2000000 ); |
41 | 41 | define( 'RENAMEUSER_CONTRIBJOB', 10000 ); |
42 | 42 | /** |
43 | | - * If you do not want to disallow the move of root userpages, set this to true |
| 43 | + * If you do not want to disallow the move of root userpages, set this to false in your LocalSettings.php |
44 | 44 | */ |
45 | | -define( 'RENAMEUSER_ROOTUSERPAGEMOVE', false ); |
| 45 | +$wgRenameUserCheckRootUserpageMoves = true; |
46 | 46 | |
47 | 47 | # Add a new log type |
48 | 48 | global $wgLogTypes, $wgLogNames, $wgLogHeaders, $wgLogActions; |
— | — | @@ -68,9 +68,14 @@ |
69 | 69 | $wgAutoloadClasses['RenameuserHooks'] = dirname( __FILE__ ) . '/SpecialRenameuser_body.php'; |
70 | 70 | $wgAutoloadClasses['RenameUserJob'] = dirname(__FILE__) . '/RenameUserJob.php'; |
71 | 71 | |
72 | | -if ( !RENAMEUSER_ROOTUSERPAGEMOVE ) |
73 | | - $wgHooks['AbortMove'][] = 'RenameuserHooks::isValidMove'; |
| 72 | +function wfRenameuserSetup () { |
| 73 | + global $wgRenameUserCheckRootUserpageMoves, $wgHooks; |
| 74 | + if ( $wgRenameUserCheckRootUserpageMoves ) |
| 75 | + $wgHooks['AbortMove'][] = 'RenameuserHooks::isValidMove'; |
| 76 | +} |
74 | 77 | |
| 78 | +$wgExtensionFunctions[] = 'wfRenameuserSetup'; |
| 79 | + |
75 | 80 | $wgSpecialPages['Renameuser'] = 'SpecialRenameuser'; |
76 | 81 | $wgSpecialPageGroups['Renameuser'] = 'users'; |
77 | 82 | $wgJobClasses['renameUser'] = 'RenameUserJob'; |