Index: trunk/phase3/maintenance/README |
— | — | @@ -39,6 +39,9 @@ |
40 | 40 | cleanupSpam.php |
41 | 41 | Mass-revert insertion of linkspam |
42 | 42 | |
| 43 | + createAndPromote.php |
| 44 | + Create a user with administrator (and optionally, bureaucrat) permissions |
| 45 | + |
43 | 46 | deleteOldRevisions.php |
44 | 47 | Erase old revisions of pages from the database |
45 | 48 | |
— | — | @@ -52,10 +55,10 @@ |
53 | 56 | XML dump importer |
54 | 57 | |
55 | 58 | importImages.php |
56 | | - Imports images into the wiki |
| 59 | + Import images into the wiki |
57 | 60 | |
58 | 61 | importTextFile.php |
59 | | - Imports the contents of a text file into a wiki page |
| 62 | + Import the contents of a text file into a wiki page |
60 | 63 | |
61 | 64 | nukePage.php |
62 | 65 | Wipe a page and all revisions from the database |
Index: trunk/phase3/maintenance/createAndPromote.php |
— | — | @@ -6,10 +6,16 @@ |
7 | 7 | * @addtogroup Maintenance |
8 | 8 | * @author Rob Church <robchur@gmail.com> |
9 | 9 | */ |
10 | | - |
| 10 | + |
| 11 | +$options = array( 'help', 'bureaucrat' ); |
11 | 12 | require_once( 'commandLine.inc' ); |
12 | 13 | |
13 | | -if( !count( $args ) == 2 ) { |
| 14 | +if( isset( $options['help'] ) ) { |
| 15 | + showHelp(); |
| 16 | + exit( 1 ); |
| 17 | +} |
| 18 | + |
| 19 | +if( count( $args ) < 2 ) { |
14 | 20 | echo( "Please provide a username and password for the new account.\n" ); |
15 | 21 | die( 1 ); |
16 | 22 | } |
— | — | @@ -36,6 +42,8 @@ |
37 | 43 | |
38 | 44 | # Promote user |
39 | 45 | $user->addGroup( 'sysop' ); |
| 46 | +if( isset( $option['bureaucrat'] ) ) |
| 47 | + $user->addGroup( 'bureaucrat' ); |
40 | 48 | |
41 | 49 | # Increment site_stats.ss_users |
42 | 50 | $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); |
— | — | @@ -43,4 +51,17 @@ |
44 | 52 | |
45 | 53 | echo( "done.\n" ); |
46 | 54 | |
| 55 | +function showHelp() { |
| 56 | + echo( <<<EOT |
| 57 | +Create a new user account with administrator rights |
47 | 58 | |
| 59 | +USAGE: php createAndPromote.php [--bureaucrat|--help] <username> <password> |
| 60 | + |
| 61 | + --bureaucrat |
| 62 | + Grant the account bureaucrat rights |
| 63 | + --help |
| 64 | + Show this help information |
| 65 | + |
| 66 | +EOT |
| 67 | + ); |
| 68 | +} |
\ No newline at end of file |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -309,6 +309,8 @@ |
310 | 310 | * Fix maintenance/importImages.php so it doesn't barf PHP errors when no |
311 | 311 | suitable files are found, and make the list of extensions an option (defaults |
312 | 312 | to $wgFileExtensions) |
| 313 | +* Add option to maintenance/createAndPromote.php to give the user bureaucrat |
| 314 | + permissions (--bureaucrat) |
313 | 315 | |
314 | 316 | == Languages updated since 1.10 == |
315 | 317 | |