update_option('admin_email', $user_email);
update_option('blog_public', $public);
+ // Freshness of site - in the future, this could get more specific about actions taken, perhaps.
+ update_option( 'fresh_site', 1 );
+
if ( $language ) {
update_option( 'WPLANG', $language );
}
}
$first_post = sprintf( $first_post,
- sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_current_site()->site_name )
+ sprintf( '<a href="%s">%s</a>', esc_url( network_home_url() ), get_network()->site_name )
);
// Back-compat for pre-4.4
$first_post = str_replace( 'SITE_URL', esc_url( network_home_url() ), $first_post );
- $first_post = str_replace( 'SITE_NAME', get_current_site()->site_name, $first_post );
+ $first_post = str_replace( 'SITE_NAME', get_network()->site_name, $first_post );
} else {
$first_post = __( 'Welcome to WordPress. This is your first post. Edit or delete it, then start writing!' );
}
update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) );
update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) );
- update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'array_version' => 3 ) );
-
+ update_option( 'sidebars_widgets', array( 'wp_inactive_widgets' => array(), 'sidebar-1' => array( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2' ), 'sidebar-2' => array(), 'sidebar-3' => array(), 'array_version' => 3 ) );
if ( ! is_multisite() )
update_user_meta( $user_id, 'show_welcome_panel', 1 );
elseif ( ! is_super_admin( $user_id ) && ! metadata_exists( 'user', $user_id, 'show_welcome_panel' ) )
$email = $user->user_email;
$name = $user->user_login;
$login_url = wp_login_url();
+ /* translators: New site notification email. 1: New site URL, 2: User login, 3: User password or password reset link, 4: Login URL */
$message = sprintf( __( "Your new WordPress site has been successfully set up at:
%1\$s
$index_type = str_replace( 'INDEX', 'KEY', $index_type );
// Escape the index name with backticks. An index for a primary key has no name.
- $index_name = ( 'PRIMARY KEY' === $index_type ) ? '' : '`' . $index_matches['index_name'] . '`';
+ $index_name = ( 'PRIMARY KEY' === $index_type ) ? '' : '`' . strtolower( $index_matches['index_name'] ) . '`';
// Parse the columns. Multiple columns are separated by a comma.
$index_columns = array_map( 'trim', explode( ',', $index_matches['index_columns'] ) );
foreach ($tableindices as $tableindex) {
// Add the index to the index data array.
- $keyname = $tableindex->Key_name;
+ $keyname = strtolower( $tableindex->Key_name );
$index_ary[$keyname]['columns'][] = array('fieldname' => $tableindex->Column_name, 'subpart' => $tableindex->Sub_part);
$index_ary[$keyname]['unique'] = ($tableindex->Non_unique == 0)?true:false;
$index_ary[$keyname]['index_type'] = $tableindex->Index_type;
// Build a create string to compare to the query.
$index_string = '';
- if ($index_name == 'PRIMARY') {
+ if ($index_name == 'primary') {
$index_string .= 'PRIMARY ';
} elseif ( $index_data['unique'] ) {
$index_string .= 'UNIQUE ';
$index_string .= 'SPATIAL ';
}
$index_string .= 'KEY ';
- if ( 'PRIMARY' !== $index_name ) {
+ if ( 'primary' !== $index_name ) {
$index_string .= '`' . $index_name . '`';
}
$index_columns = '';
// Multisite schema upgrades.
if ( $wp_current_db_version < 25448 && is_multisite() && wp_should_upgrade_global_tables() ) {
- // Upgrade verions prior to 3.7
+ // Upgrade versions prior to 3.7
if ( $wp_current_db_version < 25179 ) {
// New primary key for signups.
$wpdb->query( "ALTER TABLE $wpdb->signups ADD signup_id BIGINT(20) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST" );