X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=maintenance%2FcheckBadRedirects.php;h=b22432a0e7952832f07e4e45487274847b1ecbd5;hb=3e99665946a8b65b690118a8eaf1ea8588075b87;hp=500fc354399454e2e0008f9bafed2906a5a922f9;hpb=3301e78e5a2e5662952c0564f830a492743f9844;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/checkBadRedirects.php b/maintenance/checkBadRedirects.php index 500fc35439..b22432a0e7 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 = $this->getDB( 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" . @@ -60,5 +60,5 @@ class CheckBadRedirects extends Maintenance { } } -$maintClass = "CheckBadRedirects"; +$maintClass = CheckBadRedirects::class; require_once RUN_MAINTENANCE_IF_MAIN;