Changeset 13387
- Timestamp:
- 02/24/2010 09:30:13 PM (15 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/ms-settings.php
r13386 r13387 116 116 } 117 117 118 $wpdb->set_prefix( $table_prefix ); // set up blog tables118 $wpdb->set_prefix( $table_prefix, false ); // set DB table prefix 119 119 $wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id ); 120 120 $table_prefix = $wpdb->get_blog_prefix(); -
trunk/wp-includes/wp-db.php
r13382 r13387 549 549 * @return string|WP_Error Old prefix or WP_Error on error 550 550 */ 551 function set_prefix( $prefix ) {551 function set_prefix( $prefix, $set_table_names = true ) { 552 552 553 553 if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) … … 561 561 $this->base_prefix = $prefix; 562 562 563 foreach ( $this->tables( 'global' ) as $table => $prefixed_table ) 564 $this->$table = $prefixed_table; 565 566 if ( defined( 'VHOST' ) && empty( $this->blogid ) ) 567 return $old_prefix; 568 569 $this->prefix = $this->get_blog_prefix( $this->blogid ); 570 571 foreach ( $this->tables( 'blog' ) as $table => $prefixed_table ) 572 $this->$table = $prefixed_table; 573 574 foreach ( $this->tables( 'old' ) as $table => $prefixed_table ) 575 $this->$table = $prefixed_table; 576 563 if ( $set_table_names ) { 564 foreach ( $this->tables( 'global' ) as $table => $prefixed_table ) 565 $this->$table = $prefixed_table; 566 567 if ( defined( 'VHOST' ) && empty( $this->blogid ) ) 568 return $old_prefix; 569 570 $this->prefix = $this->get_blog_prefix( $this->blogid ); 571 572 foreach ( $this->tables( 'blog' ) as $table => $prefixed_table ) 573 $this->$table = $prefixed_table; 574 575 foreach ( $this->tables( 'old' ) as $table => $prefixed_table ) 576 $this->$table = $prefixed_table; 577 } 577 578 return $old_prefix; 578 579 }
Note: See TracChangeset
for help on using the changeset viewer.