Ticket #12459: 12459.2.diff
| File 12459.2.diff, 865 bytes (added by Denis-de-Bernardy, 3 years ago) |
|---|
-
wp-includes/ms-functions.php
49 49 return false; 50 50 51 51 $blogs = $match = array(); 52 $prefix_length = strlen($wpdb->base_prefix); 52 53 foreach ( (array) $user as $key => $value ) { 53 if ( false !== strpos( $key, '_capabilities') && 0 === strpos( $key, $wpdb->base_prefix ) && preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) { 54 if ( $prefix_length && substr($key, 0, $prefix_length) != $wpdb->base_prefix ) 55 continue; 56 if ( substr($key, -12, 12) != 'capabilities' ) 57 continue; 58 if ( preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) { 54 59 if ( count( $match ) > 2 ) 55 60 $blog_id = $match[ 2 ]; 56 61 else