X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=blobdiff_plain;f=maintenance%2Forphans.php;h=24ead605c2610d9c9c4d3a6cd37590c9047e9bdb;hb=59db24e90bc6027cb8bf2756eb8cb52230d24966;hp=7e27107a44db45f4e008aa9187a075bdffdd9523;hpb=519309a43c9613b545b7bfa0f99bbdcc94849acb;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/orphans.php b/maintenance/orphans.php index 7e27107a44..24ead605c2 100644 --- a/maintenance/orphans.php +++ b/maintenance/orphans.php @@ -39,10 +39,11 @@ require_once __DIR__ . '/Maintenance.php'; class Orphans extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Look for 'orphan' revisions hooked to pages which don't exist\n" . + $this->addDescription( "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"; + "Man this is depressing" + ); $this->addOption( 'fix', 'Actually fix broken entries' ); } @@ -71,7 +72,7 @@ class Orphans extends Maintenance { * @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' ); @@ -129,7 +130,7 @@ class Orphans extends Maintenance { * 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' ); @@ -175,7 +176,7 @@ class Orphans extends Maintenance { * @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' );