r87480 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87479‎ | r87480 | r87481 >
Date:05:11, 5 May 2011
Author:demon
Status:resolved (Comments)
Tags:
Comment:
(bug 23495) Allow createAndPromote.php to create non-sysop users
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/maintenance/createAndPromote.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/createAndPromote.php
@@ -28,7 +28,8 @@
2929
3030 public function __construct() {
3131 parent::__construct();
32 - $this->mDescription = "Create a new user account with administrator rights";
 32+ $this->mDescription = "Create a new user account";
 33+ $this->addOption( "sysop", "Grant the account sysop rights" );
3334 $this->addOption( "bureaucrat", "Grant the account bureaucrat rights" );
3435 $this->addArg( "username", "Username of new user" );
3536 $this->addArg( "password", "Password to set" );
@@ -59,9 +60,12 @@
6061 $user->saveSettings();
6162
6263 # Promote user
63 - $user->addGroup( 'sysop' );
64 - if ( $this->hasOption( 'bureaucrat' ) )
 64+ if ( $this->hasOption( 'sysop' ) ) {
6565 $user->addGroup( 'bureaucrat' );
 66+ }
 67+ if ( $this->hasOption( 'bureaucrat' ) ) {
 68+ $user->addGroup( 'bureaucrat' );
 69+ }
6670
6771 # Increment site_stats.ss_users
6872 $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 );
Index: trunk/phase3/RELEASE-NOTES
@@ -126,6 +126,7 @@
127127 * (bug 13879) Special:Emailuser asks for suitable target user if called without.
128128 * (bug 16956) IPTC and XMP metadata now extracted from images.
129129 * (bug 23816) A tracking category is now added for any pages with broken images.
 130+* (bug 23495) Allow createAndPromote.php to create non-sysop users
130131
131132 === Bug fixes in 1.18 ===
132133 * (bug 23119) WikiError class and subclasses are now marked as deprecated.

Follow-up revisions

RevisionCommit summaryAuthorDate
r88085Fix broken --sysop flag in r87480: it was triggering the bureaucrat right ins...catrope14:20, 14 May 2011

Comments

#Comment by Nikerabbit (talk | contribs)   08:05, 5 May 2011

Thanks. This would have been useful few times in the past.

Status & tagging log