Changeset 3643 for trunk/bp-core/admin/bp-core-schema.php
- Timestamp:
- 01/01/2011 09:36:22 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-schema.php
r3592 r3643 197 197 $charset_collate = bp_core_set_charset(); 198 198 199 update_site_option( 'bp-xprofile-base-group-name', 'Base');200 update_site_option( 'bp-xprofile-fullname-field-name', 'Name');199 update_site_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) ); 200 update_site_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) ); 201 201 202 202 $sql[] = "CREATE TABLE {$wpdb->base_prefix}bp_xprofile_groups ( … … 251 251 dbDelta( $sql ); 252 252 253 / * Insert the default group and fields */254 $insert_sql = false;253 // Insert the default group and fields 254 $insert_sql = array(); 255 255 256 256 if ( !$wpdb->get_var( "SELECT id FROM {$wpdb->base_prefix}bp_xprofile_groups WHERE id = 1" ) ) 257 $insert_sql[] = "INSERT INTO {$wpdb->base_prefix}bp_xprofile_groups ( name, description, can_delete ) VALUES ( '" . get_site_option( 'bp-xprofile-base-group-name' ) . "', '', 0 );";257 $insert_sql[] = "INSERT INTO {$wpdb->base_prefix}bp_xprofile_groups ( name, description, can_delete ) VALUES ( " . $wpdb->prepare( '%s', stripslashes( get_site_option( 'bp-xprofile-base-group-name' ) ) ) . ", '', 0 );"; 258 258 259 259 if ( !$wpdb->get_var( "SELECT id FROM {$wpdb->base_prefix}bp_xprofile_fields WHERE id = 1" ) ) 260 $insert_sql[] = "INSERT INTO {$wpdb->base_prefix}bp_xprofile_fields ( group_id, parent_id, type, name, description, is_required, can_delete ) VALUES ( 1, 0, 'textbox', '" . get_site_option( 'bp-xprofile-fullname-field-name' ) . "', '', 1, 0 );";260 $insert_sql[] = "INSERT INTO {$wpdb->base_prefix}bp_xprofile_fields ( group_id, parent_id, type, name, description, is_required, can_delete ) VALUES ( 1, 0, 'textbox', " . $wpdb->prepare( '%s', stripslashes( get_site_option( 'bp-xprofile-fullname-field-name' ) ) ) . ", '', 1, 0 );"; 261 261 262 262 dbDelta( $insert_sql );
Note: See TracChangeset
for help on using the changeset viewer.