* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup Maintenance
*/
}
public function getDbType() {
- return self::DB_ADMIN;
+ return Maintenance::DB_ADMIN;
}
public function execute() {
global $wgContLang;
- $tuplesAdded = $numBadLinks = $curRowsRead = 0; # counters etc
+ $numBadLinks = $curRowsRead = 0; # counters etc
$totalTuplesInserted = 0; # total tuples INSERTed into links_temp
$reportCurReadProgress = true; # whether or not to give progress reports while reading IDs from cur table
$res = $dbw->query( "SELECT cur_namespace,cur_title,cur_id FROM $cur" );
$ids = array();
- while ( $row = $dbw->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
$title = $row->cur_title;
if ( $row->cur_namespace ) {
$title = $wgContLang->getNsText( $row->cur_namespace ) . ":$title";
}
$tuplesAdded = 0; # no tuples added to INSERT yet
- while ( $row = $dbw->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
$fromTitle = $row->l_from;
if ( array_key_exists( $fromTitle, $ids ) ) { # valid title
$from = $ids[$fromTitle];