X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FfixExtLinksProtocolRelative.php;h=0fae63c3bf2441ad9b3dc52cb7882d0418a68e30;hp=d04e0c25a54153e1f092ce2ffed36215acb22dd9;hb=f5b9af121a07ecc674a63cbc65c3a01e9fa7d785;hpb=e2a7988178698b4369c7963d20610ee622db3ee7 diff --git a/maintenance/fixExtLinksProtocolRelative.php b/maintenance/fixExtLinksProtocolRelative.php index d04e0c25a5..0fae63c3bf 100644 --- a/maintenance/fixExtLinksProtocolRelative.php +++ b/maintenance/fixExtLinksProtocolRelative.php @@ -54,8 +54,8 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { return false; } $this->output( "Fixing protocol-relative entries in the externallinks table...\n" ); - $res = $db->select( 'externallinks', array( 'el_from', 'el_to', 'el_index' ), - array( 'el_index' . $db->buildLike( '//', $db->anyString() ) ), + $res = $db->select( 'externallinks', [ 'el_from', 'el_to', 'el_index' ], + [ 'el_index' . $db->buildLike( '//', $db->anyString() ) ], __METHOD__ ); $count = 0; @@ -66,28 +66,28 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { wfWaitForSlaves(); } $db->insert( 'externallinks', - array( - array( + [ + [ 'el_id' => $db->nextSequenceValue( 'externallinks_el_id_seq' ), 'el_from' => $row->el_from, 'el_to' => $row->el_to, 'el_index' => "http:{$row->el_index}", - ), - array( + ], + [ 'el_id' => $db->nextSequenceValue( 'externallinks_el_id_seq' ), 'el_from' => $row->el_from, 'el_to' => $row->el_to, 'el_index' => "https:{$row->el_index}", - ) - ), __METHOD__, array( 'IGNORE' ) + ] + ], __METHOD__, [ 'IGNORE' ] ); $db->delete( 'externallinks', - array( + [ 'el_index' => $row->el_index, 'el_from' => $row->el_from, 'el_to' => $row->el_to - ), + ], __METHOD__ ); }