X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FconvertLinks.php;h=8cd029762ffcd435b63e465be9d20b6d77e9aaed;hb=8269ed4dfd5e4395e25945b1fa2ed391684606ed;hp=fa9c574b562a5146dc1c14594c7aadd154312b8c;hpb=f132746d2882a8383cb6288325aae048b2b996e3;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/convertLinks.php b/maintenance/convertLinks.php index fa9c574b56..8cd029762f 100644 --- a/maintenance/convertLinks.php +++ b/maintenance/convertLinks.php @@ -148,7 +148,7 @@ class ConvertLinks extends Maintenance { $dbw->bufferResults( false ); $res = $dbw->query( "SELECT cur_namespace,cur_title,cur_id FROM $cur" ); - $ids = array(); + $ids = []; foreach ( $res as $row ) { $title = $row->cur_title; @@ -193,9 +193,9 @@ class ConvertLinks extends Maintenance { $sqlRead = $dbw->limitResult( $sqlRead, $linksConvInsertInterval, $rowOffset ); $res = $dbw->query( $sqlRead ); if ( $noKeys ) { - $sqlWrite = array( "INSERT INTO $links_temp (l_from,l_to) VALUES " ); + $sqlWrite = [ "INSERT INTO $links_temp (l_from,l_to) VALUES " ]; } else { - $sqlWrite = array( "INSERT IGNORE INTO $links_temp (l_from,l_to) VALUES " ); + $sqlWrite = [ "INSERT IGNORE INTO $links_temp (l_from,l_to) VALUES " ]; } $tuplesAdded = 0; # no tuples added to INSERT yet @@ -302,5 +302,5 @@ class ConvertLinks extends Maintenance { } } -$maintClass = "ConvertLinks"; +$maintClass = ConvertLinks::class; require_once RUN_MAINTENANCE_IF_MAIN;