|
MediaWiki
REL1_24
|
Maintenance script that reassigns edits from a user or IP address to another user. More...


Public Member Functions | |
| __construct () | |
| execute () | |
Private Member Functions | |
| doReassignEdits (&$from, &$to, $rc=false, $report=false) | |
| Reassign edits from one user to another. | |
| initialiseUser ($username) | |
| Initialise the user object. | |
| userConditions (&$user, $idfield, $utfield) | |
| Return the most efficient set of user conditions i.e. | |
| userSpecification (&$user, $idfield, $utfield) | |
| Return user specifications i.e. | |
Maintenance script that reassigns edits from a user or IP address to another user.
Definition at line 34 of file reassignEdits.php.
Reimplemented from Maintenance.
Definition at line 35 of file reassignEdits.php.
References Maintenance\addArg(), and Maintenance\addOption().
| ReassignEdits::doReassignEdits | ( | &$ | from, |
| &$ | to, | ||
| $ | rc = false, |
||
| $ | report = false |
||
| ) | [private] |
Reassign edits from one user to another.
| User | $from | User to take edits from |
| User | $to | User to assign edits to |
| bool | $rc | Update the recent changes table |
| bool | $report | Don't change things; just echo numbers |
Definition at line 76 of file reassignEdits.php.
References $from, $res, $total, Maintenance\output(), userConditions(), userSpecification(), and wfGetDB().
Referenced by execute().
Reimplemented from Maintenance.
Definition at line 45 of file reassignEdits.php.
References $from, doReassignEdits(), Maintenance\error(), Maintenance\getArg(), Maintenance\hasArg(), Maintenance\hasOption(), initialiseUser(), and Maintenance\output().
| ReassignEdits::initialiseUser | ( | $ | username | ) | [private] |
Initialise the user object.
| string | $username | Username or IP address |
Definition at line 181 of file reassignEdits.php.
References $user, Maintenance\error(), User\isIP(), User\newFromName(), and User.
Referenced by execute().
| ReassignEdits::userConditions | ( | &$ | user, |
| $ | idfield, | ||
| $ | utfield | ||
| ) | [private] |
Return the most efficient set of user conditions i.e.
a user => id mapping, or a user_text => text mapping
| User | $user | User for the condition |
| string | $idfield | Field name containing the identifier |
| string | $utfield | Field name containing the user text |
Definition at line 156 of file reassignEdits.php.
References $user, and array().
Referenced by doReassignEdits().
| ReassignEdits::userSpecification | ( | &$ | user, |
| $ | idfield, | ||
| $ | utfield | ||
| ) | [private] |
Return user specifications i.e.
user => id, user_text => text
| User | $user | User for the spec |
| string | $idfield | Field name containing the identifier |
| string | $utfield | Field name containing the user text |
Definition at line 171 of file reassignEdits.php.
References $user, and array().
Referenced by doReassignEdits().