build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git] / maintenance / updateRestrictions.php
index cb40af3..dec0bb6 100644 (file)
@@ -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