aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/createAndPromote.php
Commit message (Collapse)AuthorAgeFilesLines
* Remove $wgDisableAuthManagerGergő Tisza2016-06-101-13/+7
| | | | Change-Id: I2b2c9693a275fcc026916bd97f303e7a5c8df341
* Add new convenience User method for authentication data changeGergő Tisza2016-06-101-1/+14
| | | | | | | | | | | | | Also update createAndPromote.php to use it so it can display errors. Note that there are two possible approaches. The other is to do the update for all requests for which the test passed, even if some tests fail. The approach of the patch seems more manageable from the caller's point of view (either the operation was a success, or it failed and nothing happened). Change-Id: I86abed4b80472cd888337444fac0cbcb870b1246 (cherry picked from commit b568497e9a863bf71338b254eb05ca3da9c38eb5)
* Don't allow createAndPromote.php to add users to invalid groupsReedy2016-04-031-1/+6
| | | | | Bug: T131704 Change-Id: Ibe8839e62af8db002adea68ffa87b3adf2b505ea
* Convert all array() syntax to []Kunal Mehta2016-02-171-4/+4
| | | | | | | | | | Per wikitech-l consensus: https://lists.wikimedia.org/pipermail/wikitech-l/2016-February/084821.html Notes: * Disabled CallTimePassByReference due to false positives (T127163) Change-Id: I2c8ce713ce6600a0bb7bf67537c87044c7a45c4b
* Use addDescription() instead of accessing mDescription directlyMax Semenik2016-01-301-1/+1
| | | | Change-Id: I0e2aa83024b8abf5298cfea4b21bf45722ad3103
* Disallow User::setPassword() on users not in databaseBrad Jorsch2015-10-301-6/+6
| | | | | | | | | | Change I2c736ad mostly removed the password handling from the User object, but left in a little password handling to preserve the existing ability to call $user->setPassword() before the user was actually added to the database. That ability is now removed. Bug: T47716 Change-Id: Id3d40742f2e2b197ad6facd149cc6350006bf289
* Allow using createAndPromote.php with custom groupsMatthew Flaschen2015-07-071-1/+20
| | | | | | | | | This lets any group(s) be added using a comma-separated argument, in addition to the --sysop, --bureaucrat, and --bot that already existed. Bug: T105079 Change-Id: I1274b065e3dad917e545f9278b996da014d87ae9
* Update formatting in maintenance/ (2/4)Siebrand Mazeland2014-04-231-0/+1
| | | | Change-Id: I2b791d3bff0de464b6bdaaeae0622c065389c31c
* Pass phpcs-strict on maintenance/ (6/8)Siebrand Mazeland2014-04-231-4/+9
| | | | Change-Id: Icefd7660072aedb963fe3082ec40fb8ffcfd6286
* Add bot to createAndPromote.php groupsHazard-SJ2013-05-301-3/+3
| | | | | | | | - Added 'bot', a default usergroup, to $permitRoles - Changed 'administrator rights' to just 'rights', since the script isn't just for administrator rights Bug: 45160 Change-Id: I61348e2d45b90b65a117efcce65d7c581105e612
* phpcs: More require/include is not a functionTimo Tijhof2013-05-211-1/+1
| | | | | | | | | | | | | Follows-up I1343872de7, Ia533aedf63 and I2df2f80b81. Also updated usage in text in documentation and the installer LocalSettingsGenerator. Most of them were handled by this regex: - find: (require|include|require_once|include_once)\s*\(\s*(.+?)\s*\)\s*;$ - replace: $1 $2; Change-Id: I6b38aad9a5149c9c43ce18bd8edbab14b8ce43fa
* phpcs: Fix WhiteSpace.LanguageConstructSpacing warningsTimo Tijhof2013-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Squiz.WhiteSpace.LanguageConstructSpacing: Language constructs must be followed by a single space; expected "require_once expression" but found "require_once(expression)" It is a keyword (e.g. like `new`, `return` and `print`). As such the parentheses don't make sense. Per our code conventions, we use a space after keywords like these. We appeared to have an unwritten exception for `require` that doesn't make sense. About 60% of require/include usage was missing the space and/or had superfluous parentheses. It is as silly as print("foo") or return("foo"), it works because keywords have no significance for whitespace between it and the expression that follows, and since experessions can be wrapped in parentheses for clarity (e.g. when doing string concatenation or mathematical operations) the parenthesis before and after basiclaly just ignored. Change-Id: I2df2f80b8123714bea7e0771bf94b51ad5bb4b87
* Fixed spacing around parenthesis in languages/tests/maintenanceumherirrender2013-04-281-1/+1
| | | | Change-Id: Idd4299d17f1fcf98ab1d635484cb4e880f35ee24
* else if -> elseifumherirrender2013-04-171-4/+4
| | | | | | | Also fixed some spacing while at it Added some braces for one line statements Change-Id: Iebfa2b17091509daabc76248121c7763e2295d20
* Bug 35623 - createAndPromote.php: Change to allow promotion onlyMark A. Hershberger2013-02-111-24/+57
| | | | | | Introduces the --force option to promote the user even if it already exists. Change-Id: Id0cd0e49a46f78fdbff3560adf23ba0c33aae430
* Use __DIR__ instead of dirname( __FILE__ )jeroendedauw2012-08-271-1/+1
| | | | | | We can now do this since we finally switched to PHP 5.3 for MW 1.20 and get rid of the silly dirname(__FILE__) stuff :) Change-Id: Id9b2c9cd2e678197aa81c78adced5d1d31ff57b1
* Improve documentation of maintenance scripts.Alexandre Emsenhuber2012-06-161-2/+7
| | | | Change-Id: I328a3d42a09f2b082ebc153c2f399793e23942d7
* Fix broken --sysop flag in r87480: it was triggering the bureaucrat right ↵Roan Kattouw2011-05-141-1/+1
| | | | | | | instead, and createAndPromote.php couldn't be used to create sysops at all Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/88085
* (bug 23495) Allow createAndPromote.php to create non-sysop usersChad Horohoe2011-05-051-3/+7
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/87480
* Fix concern raised by Brion in r74108 (but has really existed since the ↵Chad Horohoe2011-01-131-1/+1
| | | | | | | | | | | maintenance rewrite). Right now, including a maintenance script causes it to execute. This is bad when you want to reuse the particular class but not have it start executing all by itself. Until now, we relied on setting MW_NO_SETUP which was a) hacky, b) irreversable, and c) likely to be forgotten if you didn't use one of the wrappers like runChild(). Instead, move the freaky magic to doMaintenance and have *it* check if it's in a specific call stack that indicates this is being run from the file scope and should be executed. Rename DO_MAINTENANCE to RUN_MAINTENANCE_IF_MAIN so it's nice and clear what magic happens behind the require_once(). Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/80205
* Whitespace fixup under tha maint directory.Mark A. Hershberger2010-12-041-5/+5
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/77711
* * Standardised file description headersAlexandre Emsenhuber2010-10-031-1/+1
| | | | | | | | * added @file where needed * added file description headers where needed Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/74194
* Stylize maintenance folder..Sam Reed2010-05-221-7/+7
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/66751
* Redo addArgs() as addArg() so we can actually do useful things with ↵Chad Horohoe2009-08-181-1/+2
| | | | | | | arguments like descriptions and proper requirement checks, similar to addOption() Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/55287
* Revert r54244 which was stupid and fix this properly. Require ↵Chad Horohoe2009-08-031-1/+1
| | | | | | | commandLine.inc/Maintenance.php using the full path every time. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54312
* Don't put \n on the end of every error() call, just do it in error() itself. ↵Chad Horohoe2009-08-021-2/+2
| | | | | | | Still have to use on output(), because people like "Something...done" stuff. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54240
* Merge maintenance-work branch (now with less errors!):Chad Horohoe2009-08-021-62/+63
| | | | | | | | | | | * Docs have been updated to indicate the standard on how to write maintenance scripts (MW.org docs will follow) Have ported vast majority of maintenance scripts to new format. Remaining ones (mostly FiveUpgrade-related) are a bit more tricky. commandLine.inc is untouched for now. Many have gotten code-style updates as well. Deleted .inc files were only used by their .php counterparts, and have been merged into single files. * (bug 11867) Lock error on redirect table when running orphans.php * (bug 16322) Allow maintenance scripts to accept DB user/pass over input or params * (bug 18566) Maintenance script to un/protect pages * initStats overhaul, now uses class SiteStatsInit. Also fixes bug 18930 Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/54225
* (bug 19157) createAndPromote error on bad passwordChad Horohoe2009-06-271-1/+6
| | | | | | | | | | * Tweak User::isValidPassword() and hook. Return a STRING msg key on failure, not false. Updated all callers to handle this * Split too-short/match username errors for clarity * Update docs, messages. * Merge fix for bug from maintenance-work branch Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/52494
* Revert r52336 "Merge maintenance-work branch:"Brion Vibber2009-06-241-48/+56
| | | | | | | | Seems to have broken a bunch of stuff. Don't commit giant non-critical changes that break Setup.php and all maint scripts. Thanks! Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/52340
* Merge maintenance-work branch:Chad Horohoe2009-06-241-56/+48
| | | | | | | | | | | | * (bug 16322) Allow maint scripts to accept DB user/pass over input or params if no AdminSettings.php * (bug 18768) Remove AdminSettings.php from MediaWiki core * (bug 19157) createAndPromote error on bad password * (bug 14201) Create AdminSettings.php during wiki installation, in the same way as LocalSettings.php * Introduce new Maintenance class framework and port a good number of scripts over; the ones that are left are a little more complicated. Read the docs. * Not deleting "unused" files yet, don't want to break everything at once :) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/52336
* WARNING: HUGE COMMITAlexandre Emsenhuber2008-05-201-1/+2
| | | | | | | | | | | | | | | | | | Doxygen documentation update: * Changed alls @addtogroup to @ingroup. @addtogroup adds the comment to the group description, but doesn't add the file, class, function, ... to the group like @ingroup does. See for example http://svn.wikimedia.org/doc/group__SpecialPage.html where it's impossible to see related files, classes, ... that should belong to that group. * Added @file to file description, it seems that it should be explicitely decalred for file descriptions, otherwise doxygen will think that the comment document the first class, variabled, function, ... that is in that file. * Removed some empty comments * Removed some ?> Added following groups: * ExternalStorage * JobQueue * MaintenanceLanguage One more thing: there are still a lot of warnings when generating the doc. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/35098
* * (bug 12416) Fix password setting for createAndPromote.phpBrion Vibber2007-12-281-1/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/28914
* * Add option to maintenance/createAndPromote.php to give the user bureaucrat ↵Rob Church2007-07-061-2/+23
| | | | | | | | | | permissions (--bureaucrat) * Some --help on maintenance/createAndPromote.php * Tweak maintenance/README Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/23808
* Remove ?>'s from files. They're pointless, and just asking for people to ↵Aryeh Gregor2007-06-291-1/+1
| | | | | | | mess with the files and add trailing whitespace. (Yes, I looked over every one and reverted those that were bogus. Slash-enter a million times in less worked well enough, although it was a bit mind-numbing.) Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/23531
* Use Doxygen @addtogroup instead of phpdoc @package && @subpackageAntoine Musso2007-01-201-2/+1
| | | | Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/19502
* Abolished $wgDBname as a unique wiki identifier, it doesn't work with the ↵Tim Starling2006-10-041-3/+2
| | | | | | | | | new-fangled feature we call "table prefixes". Instead use wfWikiID() for an identifier containing the DB name and the prefix if there is one, and wfMemcKey() for cache key construction. Caches for wikis with table prefixes will be lost on upgrade, caches for wikis without table prefixes will be preserved. Custom cache keys in extensions can be migrated at leisure. Extensions which write to core cache keys should be migrated ASAP, as I have done with Special:Makesysop. Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/16791
* Maintenance script to create an account and promote it to administratorRob Church2006-06-171-0/+48
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/14803