public function __construct() {
parent::__construct();
$this->mDescription = "Look for 'orphan' revisions hooked to pages which don't exist\n" .
- "and 'childless' pages with no revisions\n" .
- "Then, kill the poor widows and orphans\n" .
- "Man this is depressing";
+ "and 'childless' pages with no revisions\n" .
+ "Then, kill the poor widows and orphans\n" .
+ "Man this is depressing";
$this->addOption( 'fix', 'Actually fix broken entries' );
}
* @param bool $fix Whether to fix broken revisions when found
*/
private function checkOrphans( $fix ) {
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$page = $dbw->tableName( 'page' );
$revision = $dbw->tableName( 'revision' );
* but valid revisions do exist)
*/
private function checkWidows( $fix ) {
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$page = $dbw->tableName( 'page' );
$revision = $dbw->tableName( 'revision' );
* @param bool $fix Whether to fix broken entries
*/
private function checkSeparation( $fix ) {
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $this->getDB( DB_MASTER );
$page = $dbw->tableName( 'page' );
$revision = $dbw->tableName( 'revision' );