X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FdumpLinks.php;h=74b500a1c49136c5fc21d7a3de42170c6197a2dc;hb=87af058741eac7c63eba52286031645ad5ee8925;hp=be0b46332bfec3d2447054a3c1783d8258b03cf1;hpb=7636bea2bf3ccc33389a97d968bdda64036f59c0;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/dumpLinks.php b/maintenance/dumpLinks.php index be0b46332b..74b500a1c4 100644 --- a/maintenance/dumpLinks.php +++ b/maintenance/dumpLinks.php @@ -9,7 +9,7 @@ * Dumps ASCII text to stdout; command-line. * * Copyright © 2005 Brion Vibber - * http://www.mediawiki.org/ + * https://www.mediawiki.org/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ class DumpLinks extends Maintenance { } public function execute() { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = $this->getDB( DB_SLAVE ); $result = $dbr->select( array( 'pagelinks', 'page' ), array( 'page_id', @@ -59,7 +59,7 @@ class DumpLinks extends Maintenance { $lastPage = null; foreach ( $result as $row ) { if ( $lastPage != $row->page_id ) { - if ( isset( $lastPage ) ) { + if ( $lastPage !== null ) { $this->output( "\n" ); } $page = Title::makeTitle( $row->page_namespace, $row->page_title ); @@ -69,7 +69,7 @@ class DumpLinks extends Maintenance { $link = Title::makeTitle( $row->pl_namespace, $row->pl_title ); $this->output( " " . $link->getPrefixedURL() ); } - if ( isset( $lastPage ) ) { + if ( $lastPage !== null ) { $this->output( "\n" ); } }