X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpLinks.php;h=6904953fe73b430191e897f5612ea70eddb45239;hb=46072ba301ea98f6e19487ce84c6fd8cc0d403f1;hp=74b500a1c49136c5fc21d7a3de42170c6197a2dc;hpb=764cfa7d85ddfae9f23abd94c3d416fc4680ed0b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpLinks.php b/maintenance/dumpLinks.php index 74b500a1c4..6904953fe7 100644 --- a/maintenance/dumpLinks.php +++ b/maintenance/dumpLinks.php @@ -40,21 +40,21 @@ require_once __DIR__ . '/Maintenance.php'; class DumpLinks extends Maintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Quick demo hack to generate a plaintext link dump"; + $this->addDescription( 'Quick demo hack to generate a plaintext link dump' ); } public function execute() { - $dbr = $this->getDB( DB_SLAVE ); - $result = $dbr->select( array( 'pagelinks', 'page' ), - array( + $dbr = $this->getDB( DB_REPLICA ); + $result = $dbr->select( [ 'pagelinks', 'page' ], + [ 'page_id', 'page_namespace', 'page_title', 'pl_namespace', - 'pl_title' ), - array( 'page_id=pl_from' ), + 'pl_title' ], + [ 'page_id=pl_from' ], __METHOD__, - array( 'ORDER BY' => 'page_id' ) ); + [ 'ORDER BY' => 'page_id' ] ); $lastPage = null; foreach ( $result as $row ) { @@ -75,5 +75,5 @@ class DumpLinks extends Maintenance { } } -$maintClass = "DumpLinks"; +$maintClass = DumpLinks::class; require_once RUN_MAINTENANCE_IF_MAIN;