Changeset 57
- Timestamp:
- 05/05/2008 06:02:55 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
bp-friends.php (modified) (1 diff)
-
bp-groups.php (modified) (1 diff)
-
bp-messages.php (modified) (4 diffs)
-
bp-xprofile.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends.php
r30 r57 1 1 <?php 2 3 add_site_option('bp-friends-version', '0.1'); 2 4 3 5 /************************************************************************** -
trunk/bp-groups.php
r30 r57 1 1 <?php 2 3 add_site_option('bp-groups-version', '0.1'); 2 4 3 5 $bp_groups_table_name = $wpdb->base_prefix . "bp_groups"; -
trunk/bp-messages.php
r56 r57 19 19 **************************************************************************/ 20 20 21 function messages_install( ) {21 function messages_install( $version ) { 22 22 global $wpdb, $bp_messages_table_name, $bp_messages_table_name_deleted; 23 23 24 $sql[ 0] = "CREATE TABLE ". $bp_messages_table_name ." (24 $sql[] = "CREATE TABLE ". $bp_messages_table_name ." ( 25 25 id int(11) NOT NULL AUTO_INCREMENT, 26 26 sender_id int(11) NOT NULL, … … 34 34 );"; 35 35 36 $sql[ 1] = "CREATE TABLE ". $bp_messages_table_name_deleted ." (36 $sql[] = "CREATE TABLE ". $bp_messages_table_name_deleted ." ( 37 37 id int(11) NOT NULL AUTO_INCREMENT, 38 38 thread_id int(11) NOT NULL, … … 44 44 require_once( ABSPATH . 'wp-admin/upgrade-functions.php' ); 45 45 dbDelta($sql); 46 47 add_site_option('bp-messages-version', $version); 46 48 } 47 49 … … 72 74 73 75 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 74 if ( $wpdb->get_var( "show tables like '%" . $bp_messages_table_name . "%'" ) == false)75 messages_install( );76 if ( ( $wpdb->get_var( "show tables like '%" . $bp_messages_table_name . "%'" ) == false ) || ( get_site_option('bp-messages-version') < '0.2' ) ) 77 messages_install('0.2'); 76 78 } 77 79 add_action( 'admin_menu', 'messages_add_menu' ); -
trunk/bp-xprofile.php
r56 r57 22 22 **************************************************************************/ 23 23 24 function xprofile_install( ) {24 function xprofile_install( $version ) { 25 25 global $bp_xprofile_table_name_groups, $bp_xprofile_table_name_fields, $bp_xprofile_table_name_data; 26 26 … … 62 62 require_once( ABSPATH . 'wp-admin/upgrade-functions.php' ); 63 63 dbDelta($sql); 64 65 add_site_option('bp-xprofile-version', $version); 64 66 } 65 67 … … 92 94 93 95 /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */ 94 if ( $wpdb->get_var("show tables like '%" . $bp_xprofile_table_name . "%'") == false)95 xprofile_install( );96 if ( ( $wpdb->get_var("show tables like '%" . $bp_xprofile_table_name . "%'") == false ) || ( get_site_option('bp-xprofile-version') < '0.2' ) ) 97 xprofile_install('0.2'); 96 98 } 97 99 add_action( 'admin_menu', 'xprofile_add_menu' );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)