X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdumpLinks.php;h=ff4e8945025a42b01afec9608dadb7c90c09018d;hb=ef50d30b7b8e3b6f8480b74135f2f2e30f479336;hp=74b500a1c49136c5fc21d7a3de42170c6197a2dc;hpb=04fdc78370dbc042116488d6826e19bf3910273b;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpLinks.php b/maintenance/dumpLinks.php index 74b500a1c4..ff4e894502 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 ) {