allow empty table prefix on my-sites.php, see #12459

git-svn-id: http://svn.automattic.com/wordpress/trunk@13562 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
wpmuguru 2010-03-02 22:21:24 +00:00
parent 3775882493
commit d3e9b5ba92
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ function get_blogs_of_user( $id, $all = false ) {
$blogs = $match = array();
foreach ( (array) $user as $key => $value ) {
if ( false !== strpos( $key, '_capabilities') && 0 === strpos( $key, $wpdb->base_prefix ) && preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) {
if ( false !== strpos( $key, '_capabilities') && ( strlen( $wpdb->base_prefix ) == 0 || 0 === strpos( $key, $wpdb->base_prefix ) ) && preg_match( '/' . $wpdb->base_prefix . '((\d+)_)?capabilities/', $key, $match ) ) {
if ( count( $match ) > 2 )
$blog_id = $match[ 2 ];
else