* Fix maintenance/importImages.php so it doesn't barf PHP errors when no
suitable files are found, and make the list of extensions an option (defaults
to $wgFileExtensions)
+* Add option to maintenance/createAndPromote.php to give the user bureaucrat
+ permissions (--bureaucrat)
== Languages updated since 1.10 ==
cleanupSpam.php
Mass-revert insertion of linkspam
+ createAndPromote.php
+ Create a user with administrator (and optionally, bureaucrat) permissions
+
deleteOldRevisions.php
Erase old revisions of pages from the database
XML dump importer
importImages.php
- Imports images into the wiki
+ Import images into the wiki
importTextFile.php
- Imports the contents of a text file into a wiki page
+ Import the contents of a text file into a wiki page
nukePage.php
Wipe a page and all revisions from the database
* @addtogroup Maintenance
* @author Rob Church <robchur@gmail.com>
*/
-
+
+$options = array( 'help', 'bureaucrat' );
require_once( 'commandLine.inc' );
-if( !count( $args ) == 2 ) {
+if( isset( $options['help'] ) ) {
+ showHelp();
+ exit( 1 );
+}
+
+if( count( $args ) < 2 ) {
echo( "Please provide a username and password for the new account.\n" );
die( 1 );
}
# Promote user
$user->addGroup( 'sysop' );
+if( isset( $option['bureaucrat'] ) )
+ $user->addGroup( 'bureaucrat' );
# Increment site_stats.ss_users
$ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 );
echo( "done.\n" );
+function showHelp() {
+ echo( <<<EOT
+Create a new user account with administrator rights
+
+USAGE: php createAndPromote.php [--bureaucrat|--help] <username> <password>
+
+ --bureaucrat
+ Grant the account bureaucrat rights
+ --help
+ Show this help information
+EOT
+ );
+}
\ No newline at end of file