MediaWiki  REL1_24
PopulateRevisionLength Class Reference

Maintenance script that populates the rev_len and ar_len fields for old revisions created before MW 1.10. More...

Inheritance diagram for PopulateRevisionLength:
Collaboration diagram for PopulateRevisionLength:

List of all members.

Public Member Functions

 __construct ()
 doDBUpdates ()
 Do the actual work.

Protected Member Functions

 doLenUpdates ($table, $idCol, $prefix, $fields)
 getUpdateKey ()
 Get the update key name to go in the update log table.
 upgradeRow ($row, $table, $idCol, $prefix)

Detailed Description

Maintenance script that populates the rev_len and ar_len fields for old revisions created before MW 1.10.

Definition at line 33 of file populateRevisionLength.php.


Constructor & Destructor Documentation


Member Function Documentation

Do the actual work.

All child classes will need to implement this. Return true to log the update as done or false (usually on failure).

Returns:
bool

Reimplemented from LoggedUpdateMaintenance.

Definition at line 44 of file populateRevisionLength.php.

References $rev, doLenUpdates(), Maintenance\error(), Maintenance\getDB(), Maintenance\output(), Revision\selectArchiveFields(), and Revision\selectFields().

PopulateRevisionLength::doLenUpdates ( table,
idCol,
prefix,
fields 
) [protected]
Parameters:
string$table
string$idCol
string$prefix
array$fields
Returns:
int

Definition at line 75 of file populateRevisionLength.php.

References $count, $res, array(), as, Maintenance\getDB(), Maintenance\output(), upgradeRow(), and wfWaitForSlaves().

Referenced by doDBUpdates().

Get the update key name to go in the update log table.

Returns:
string

Reimplemented from LoggedUpdateMaintenance.

Definition at line 40 of file populateRevisionLength.php.

PopulateRevisionLength::upgradeRow ( row,
table,
idCol,
prefix 
) [protected]
Parameters:
stdClass$row
string$table
string$idCol
string$prefix
Returns:
bool

Definition at line 127 of file populateRevisionLength.php.

References $content, $rev, array(), Maintenance\getDB(), Revision\newFromArchiveRow(), and Maintenance\output().

Referenced by doLenUpdates().


The documentation for this class was generated from the following file: