X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcheckBadRedirects.php;h=097ad1f588735aa718895845ec7657643a53baab;hb=c3b7687aed809948dc7efbfeed6c52bcc4631197;hp=fec92910e4bd1783eda367ba669f21bf1a9f15ff;hpb=2e040b99eda6c99cf472b3896f62d2f21315e808;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index fec92910e4..097ad1f588 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_SLAVE ); $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" .