TableCleanup Class Reference

Generic table cleanup class. More...

Inherits Maintenance.

Inherited by CapsCleanup, ImageCleanup, TableCleanupTest, TitleCleanup, and WatchlistCleanup.

List of all members.

Public Member Functions

 __construct ()
 Default constructor.
 execute ()
 Do the actual work.
 runTable ($params)

Public Attributes

 $batchSize = 100
 $reportInterval = 100

Protected Member Functions

 init ($count, $table)
 progress ($updated)
 hexChar ($matches)

Protected Attributes

 $defaultParams
 $dryrun = false
 $maxLag = 10


Detailed Description

Generic table cleanup class.

Already subclasses maintenance

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 25 of file cleanupTable.inc.


Constructor & Destructor Documentation

TableCleanup::__construct (  ) 

Default constructor.

Children should call this if implementing their own constructors

Reimplemented from Maintenance.

Reimplemented in CapsCleanup, ImageCleanup, TitleCleanup, and WatchlistCleanup.

Definition at line 38 of file cleanupTable.inc.

References Maintenance::addOption().


Member Function Documentation

TableCleanup::execute (  ) 

Do the actual work.

All child classes will need to implement this

Reimplemented from Maintenance.

Reimplemented in CapsCleanup, and WatchlistCleanup.

Definition at line 43 of file cleanupTable.inc.

References $wgUser, Maintenance::hasOption(), Maintenance::output(), and runTable().

TableCleanup::hexChar ( matches  )  [protected]

Definition at line 152 of file cleanupTable.inc.

TableCleanup::init ( count,
table 
) [protected]

Definition at line 55 of file cleanupTable.inc.

References wfTime().

Referenced by runTable().

TableCleanup::progress ( updated  )  [protected]

TableCleanup::runTable ( params  ) 

Definition at line 93 of file cleanupTable.inc.

References $dbr, $options, $res, init(), Maintenance::output(), and wfGetDB().

Referenced by execute(), and CapsCleanup::execute().


Member Data Documentation

TableCleanup::$batchSize = 100

Definition at line 35 of file cleanupTable.inc.

TableCleanup::$defaultParams [protected]

Initial value:

 array(
                'table' => 'page',
                'conds' => array(),
                'index' => 'page_id',
                'callback' => 'processRow',
        )

Reimplemented in ImageCleanup, and WatchlistCleanup.

Definition at line 26 of file cleanupTable.inc.

TableCleanup::$dryrun = false [protected]

Definition at line 33 of file cleanupTable.inc.

TableCleanup::$maxLag = 10 [protected]

Definition at line 34 of file cleanupTable.inc.

TableCleanup::$reportInterval = 100

Definition at line 36 of file cleanupTable.inc.


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

Generated on Sat Apr 30 22:57:50 2011 for MediaWiki by  doxygen 1.5.9