X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FupdateRestrictions.php;h=dec0bb69142b9a3f58743d9c2530e0fd7fe22a42;hb=d994407830c65f7bcb6c1f9130b2e74b0d576a16;hp=c4dccbc65f8d78bded25fecc6c9890af54e26b1a;hpb=8a95833baed3b8071fcbd8cd2bc8c3449409f665;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/updateRestrictions.php b/maintenance/updateRestrictions.php index c4dccbc65f..dec0bb6914 100644 --- a/maintenance/updateRestrictions.php +++ b/maintenance/updateRestrictions.php @@ -46,11 +46,11 @@ class UpdateRestrictions extends Maintenance { $this->fatalError( "page_restrictions table does not exist" ); } - $start = $db->selectField( 'page', 'MIN(page_id)', false, __METHOD__ ); + $start = $db->selectField( 'page', 'MIN(page_id)', '', __METHOD__ ); if ( !$start ) { $this->fatalError( "Nothing to do." ); } - $end = $db->selectField( 'page', 'MAX(page_id)', false, __METHOD__ ); + $end = $db->selectField( 'page', 'MAX(page_id)', '', __METHOD__ ); # Do remaining chunk $end += $batchSize - 1; @@ -71,7 +71,7 @@ class UpdateRestrictions extends Maintenance { foreach ( $res as $row ) { $oldRestrictions = []; foreach ( explode( ':', trim( $row->page_restrictions ) ) as $restrict ) { - $temp = explode( '=', trim( $restrict ) ); + $temp = explode( '=', trim( $restrict ), 2 ); // Make sure we are not settings restrictions to "" if ( count( $temp ) == 1 && $temp[0] ) { // old old format should be treated as edit/move restriction @@ -126,5 +126,5 @@ class UpdateRestrictions extends Maintenance { } } -$maintClass = "UpdateRestrictions"; +$maintClass = UpdateRestrictions::class; require_once RUN_MAINTENANCE_IF_MAIN;