Ticket #918: load-ordering-fix.patch
File load-ordering-fix.patch, 1.2 KB (added by , 15 years ago) |
---|
-
bp-forums-bbpress.php
38 38 39 39 require_once( BACKPRESS_PATH . 'class.wp-taxonomy.php' ); 40 40 require_once( BB_PATH . BB_INC . 'class.bb-taxonomy.php' ); 41 42 require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' );43 41 44 42 $bb = new stdClass(); 45 43 require_once( $bp->forums->bbconfig ); … … 69 67 $bbdb->prefix = $bb_table_prefix; 70 68 71 69 define( 'BB_INSTALLING', false ); 70 71 if ( !$tables_installed = (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A ) ) 72 require_once( ABSPATH . 'wp-admin/upgrade-functions.php' ); 73 74 require_once( BB_PATH . 'bb-admin/includes/functions.bb-admin.php' ); 72 75 73 76 if ( is_object( $wp_roles ) ) { 74 77 $bb_roles =& $wp_roles; … … 92 95 $bb->site_id = BP_ROOT_BLOG; 93 96 94 97 /* Check if the tables are installed, if not, install them */ 95 if ( ! (boolean) $bbdb->get_results( 'DESCRIBE `' . $bbdb->forums . '`;', ARRAY_A )) {98 if ( !$tables_installed ) { 96 99 require_once( BB_PATH . 'bb-admin/includes/defaults.bb-schema.php' ); 97 require_once( ABSPATH . 'wp-admin/upgrade-functions.php' );98 100 99 101 dbDelta( $bb_queries ); 100 102