Inherits Maintenance.
Public Member Functions | |
__construct () | |
Default constructor. | |
execute () | |
Do the actual work. | |
Private Member Functions | |
doReassignEdits (&$from, &$to, $rc=false, $report=false) | |
Reassign edits from one user to another. | |
userConditions (&$user, $idfield, $utfield) | |
Return the most efficient set of user conditions i.e. | |
userSpecification (&$user, $idfield, $utfield) | |
Return user specifications i.e. | |
initialiseUser ($username) | |
Initialise the user object. |
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
Definition at line 27 of file reassignEdits.php.
ReassignEdits::__construct | ( | ) |
Default constructor.
Children should call this if implementing their own constructors
Reimplemented from Maintenance.
Definition at line 28 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.
$from | User to take edits from | |
$to | User to assign edits to | |
$rc | Update the recent changes table | |
$report | Don't change things; just echo numbers |
Definition at line 68 of file reassignEdits.php.
References $dbw, $res, $total, Maintenance::output(), userConditions(), userSpecification(), and wfGetDB().
Referenced by execute().
ReassignEdits::execute | ( | ) |
Do the actual work.
All child classes will need to implement this
Reimplemented from Maintenance.
Definition at line 38 of file reassignEdits.php.
References doReassignEdits(), Maintenance::error(), Maintenance::getArg(), Maintenance::hasArg(), Maintenance::hasOption(), initialiseUser(), and Maintenance::output().
ReassignEdits::initialiseUser | ( | $ | username | ) | [private] |
Initialise the user object.
$username | Username or IP address |
Definition at line 152 of file reassignEdits.php.
References User::isIP(), and User::newFromName().
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 for the condition | |
$idfield | Field name containing the identifier | |
$utfield | Field name containing the user text |
Definition at line 129 of file reassignEdits.php.
Referenced by doReassignEdits().
ReassignEdits::userSpecification | ( | &$ | user, | |
$ | idfield, | |||
$ | utfield | |||
) | [private] |
Return user specifications i.e.
user => id, user_text => text
$user | User for the spec | |
$idfield | Field name containing the identifier | |
$utfield | Field name containing the user text |
Definition at line 142 of file reassignEdits.php.
Referenced by doReassignEdits().