X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FcheckBadRedirects.php;h=6eafc96ec5ec7765a6062f8e45990ceee0909df6;hb=41690888a2919b3fb89c715c364d21d8965c8b26;hp=fec92910e4bd1783eda367ba669f21bf1a9f15ff;hpb=19a38526f390cfdc6a6061cc055fc7f13167bf03;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index fec92910e4..6eafc96ec5 100644 --- a/maintenance/checkBadRedirects.php +++ b/maintenance/checkBadRedirects.php @@ -31,16 +31,16 @@ require_once __DIR__ . '/Maintenance.php'; class CheckBadRedirects extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Check for bad redirects"; + $this->addDescription( 'Check for bad redirects' ); } public function execute() { $this->output( "Fetching redirects...\n" ); - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $result = $dbr->select( - array( 'page' ), - array( 'page_namespace', 'page_title', 'page_latest' ), - array( 'page_is_redirect' => 1 ) ); + [ 'page' ], + [ 'page_namespace', 'page_title', 'page_latest' ], + [ 'page_is_redirect' => 1 ] ); $count = $result->numRows(); $this->output( "Found $count redirects.\n" .