Changeset 5827 for trunk/src/includes/admin/converter.php
- Timestamp:
- 07/14/2015 12:31:42 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/admin/converter.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/converter.php
r5770 r5827 630 630 */ 631 631 public function sync_table( $drop = false ) { 632 global $wpdb; 633 634 $table_name = $ wpdb->prefix . 'bbp_converter_translator';635 if ( ! empty( $drop ) && $ wpdb->get_var( "SHOW TABLES LIKE '{$table_name}'" ) == $table_name ) {636 $ wpdb->query( "DROP TABLE {$table_name}" );632 633 $bbp_db = bbp_db(); 634 $table_name = $bbp_db->prefix . 'bbp_converter_translator'; 635 if ( ! empty( $drop ) && $bbp_db->get_var( "SHOW TABLES LIKE '{$table_name}'" ) == $table_name ) { 636 $bbp_db->query( "DROP TABLE {$table_name}" ); 637 637 } 638 638 639 639 require_once( ABSPATH . '/wp-admin/includes/upgrade.php' ); 640 640 641 if ( !empty( $ wpdb->charset ) ) {642 $charset_collate = "DEFAULT CHARACTER SET $ wpdb->charset";643 } 644 645 if ( !empty( $ wpdb->collate ) ) {646 $charset_collate .= " COLLATE $ wpdb->collate";641 if ( !empty( $bbp_db->charset ) ) { 642 $charset_collate = "DEFAULT CHARACTER SET $bbp_db->charset"; 643 } 644 645 if ( !empty( $bbp_db->collate ) ) { 646 $charset_collate .= " COLLATE $bbp_db->collate"; 647 647 } 648 648 … … 676 676 677 677 /** 678 * @var object This is the connection to the WordPress dat base.678 * @var object This is the connection to the WordPress database. 679 679 */ 680 680 protected $wpdb; … … 740 740 741 741 private function setup_globals() { 742 global $wpdb;743 742 744 743 /** Get database connections ******************************************/ 745 744 746 $this->wpdb = $wpdb;745 $this->wpdb = bbp_db(); 747 746 $this->max_rows = (int) $_POST['_bbp_converter_rows']; 748 747 $this->opdb = new wpdb( $_POST['_bbp_converter_db_user'], $_POST['_bbp_converter_db_pass'], $_POST['_bbp_converter_db_name'], $_POST['_bbp_converter_db_server'] );
Note: See TracChangeset
for help on using the changeset viewer.