diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-24 11:45:39 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-04-24 11:45:39 +0000 |
| commit | cf9f85dc8121a359d550ffa3b735fb48859eee88 (patch) | |
| tree | 9f90be15fc46163f5656f019f2a2866414b7c9f2 /wp-admin/includes/upgrade.php | |
| parent | f10f9f5b05e23ce4c07479b094bd3ff4bbfd86d0 (diff) | |
| download | wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.tar.gz wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.tar.xz wordpress-mu-cf9f85dc8121a359d550ffa3b735fb48859eee88.zip | |
Merged with WP 2.5, revision 7806
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/includes/upgrade.php')
| -rw-r--r-- | wp-admin/includes/upgrade.php | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 1cc9df9..94bdbd3 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -62,13 +62,13 @@ function wp_install_defaults($user_id) { // Default category $cat_name = $wpdb->escape(__('Uncategorized')); - $cat_slug = sanitize_title(__('Uncategorized')); + $cat_slug = sanitize_title(_c('Uncategorized|Default category slug')); $wpdb->query("INSERT INTO $wpdb->terms (name, slug, term_group) VALUES ('$cat_name', '$cat_slug', '0')"); $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('1', 'category', '', '0', '1')"); // Default link category $cat_name = $wpdb->escape(__('Blogroll')); - $cat_slug = sanitize_title(__('Blogroll')); + $cat_slug = sanitize_title(_c('Blogroll|Default link category slug')); $wpdb->query("INSERT INTO $wpdb->terms (name, slug, term_group) VALUES ('$cat_name', '$cat_slug', '0')"); $wpdb->query("INSERT INTO $wpdb->term_taxonomy (term_id, taxonomy, description, parent, count) VALUES ('2', 'link_category', '', '0', '7')"); @@ -98,7 +98,7 @@ function wp_install_defaults($user_id) { $now = date('Y-m-d H:i:s'); $now_gmt = gmdate('Y-m-d H:i:s'); $first_post_guid = get_option('home') . '/?p=1'; - $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, guid, comment_count, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'))."', '', '".$wpdb->escape(__('Hello world!'))."', '0', '".$wpdb->escape(__('hello-world'))."', '$now', '$now_gmt', '$first_post_guid', '1', '', '', '')"); + $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, guid, comment_count, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!'))."', '', '".$wpdb->escape(__('Hello world!'))."', '0', '".$wpdb->escape(_c('hello-world|Default post slug'))."', '$now', '$now_gmt', '$first_post_guid', '1', '', '', '')"); $wpdb->query( "INSERT INTO $wpdb->term_relationships (`object_id`, `term_taxonomy_id`) VALUES (1, 1)" ); // Default comment @@ -106,7 +106,7 @@ function wp_install_defaults($user_id) { // First Page $first_post_guid = get_option('home') . '/?page_id=2'; - $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, guid, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(__('about'))."', '$now', '$now_gmt','$first_post_guid', 'publish', 'page', '', '', '')"); + $wpdb->query("INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_excerpt, post_title, post_category, post_name, post_modified, post_modified_gmt, guid, post_status, post_type, to_ping, pinged, post_content_filtered) VALUES ($user_id, '$now', '$now_gmt', '".$wpdb->escape(__('This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from. You can create as many pages like this one or sub-pages as you like and manage all of your content inside of WordPress.'))."', '', '".$wpdb->escape(__('About'))."', '0', '".$wpdb->escape(_c('about|Default page slug'))."', '$now', '$now_gmt','$first_post_guid', 'publish', 'page', '', '', '')"); } endif; @@ -202,6 +202,9 @@ function upgrade_all() { if ( $wp_current_db_version < 7499 ) upgrade_250(); + if ( $wp_current_db_version < 7796 ) + upgrade_251(); + maybe_disable_automattic_widgets(); $wp_rewrite->flush_rules(); @@ -737,6 +740,13 @@ function upgrade_250() { } +function upgrade_251() { + global $wp_current_db_version; + + // Make the secret longer + update_option('secret', wp_generate_password(64)); +} + // The functions we use to actually do stuff // General |
