summaryrefslogtreecommitdiffstats
path: root/wp-admin
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-01 12:27:29 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-12-01 12:27:29 +0000
commitaae5b160f307adf0703ae8f7c2b158b91570ec95 (patch)
treeba0d1eee6e2eedfe3fd0a693d773162ab9dc8a67 /wp-admin
parent9415bbca12c01c39da58e0ed2c4e6b44ff833e5d (diff)
downloadwordpress-mu-aae5b160f307adf0703ae8f7c2b158b91570ec95.tar.gz
wordpress-mu-aae5b160f307adf0703ae8f7c2b158b91570ec95.tar.xz
wordpress-mu-aae5b160f307adf0703ae8f7c2b158b91570ec95.zip
WP Merge to 4578, except for script-loader
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@817 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin')
-rw-r--r--wp-admin/admin-ajax.php9
-rw-r--r--wp-admin/admin-functions.php10
-rw-r--r--wp-admin/export.php21
-rw-r--r--wp-admin/upgrade-schema.php3
4 files changed, 25 insertions, 18 deletions
diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php
index cc93b16..c5d48b9 100644
--- a/wp-admin/admin-ajax.php
+++ b/wp-admin/admin-ajax.php
@@ -155,7 +155,10 @@ case 'add-meta' :
if ( !current_user_can( 'edit_post', $id ) )
die('-1');
if ( $id < 0 ) {
- if ( $pid = wp_insert_post() )
+ $now = current_time('timestamp');
+ if ( $pid = wp_insert_post( array(
+ 'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now))
+ ) ) )
$mid = add_meta( $pid );
else
die('0');
@@ -181,7 +184,7 @@ case 'update-meta' :
$key = $_POST['meta'][$mid]['key'];
$value = $_POST['meta'][$mid]['value'];
if ( !$meta = get_post_meta_by_id( $mid ) )
- die('0');
+ die('0'); // if meta doesn't exist
if ( !current_user_can( 'edit_post', $meta->post_id ) )
die('-1');
if ( $u = update_meta( $mid, $key, $value ) ) {
@@ -195,7 +198,7 @@ case 'update-meta' :
) );
$x->send();
}
- die('0');
+ die('1'); // We know meta exists; we also know it's unchanged (or DB error, in which case there are bigger problems).
break;
case 'add-user' :
if ( !current_user_can('edit_users') )
diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php
index aaf16ca..624b693 100644
--- a/wp-admin/admin-functions.php
+++ b/wp-admin/admin-functions.php
@@ -1268,16 +1268,16 @@ function save_mod_rewrite_rules() {
$home_path = get_home_path();
if (!$wp_rewrite->using_mod_rewrite_permalinks() )
- return;
+ return false;
if (!((!file_exists( $home_path.'.htaccess' ) && is_writable( $home_path ) ) || is_writable( $home_path.'.htaccess' ) ) )
- return;
+ return false;
if (! got_mod_rewrite() )
- return;
+ return false;
$rules = explode( "\n", $wp_rewrite->mod_rewrite_rules() );
- insert_with_markers( $home_path.'.htaccess', 'WordPress', $rules );
+ return insert_with_markers( $home_path.'.htaccess', 'WordPress', $rules );
}
function get_broken_themes() {
@@ -2097,7 +2097,7 @@ function wp_check_for_changed_slugs($post_id) {
if ( $post->post_name == $_POST['wp-old-slug'] )
return $post_id;
- $old_slugs = get_post_meta($post_id, '_wp_old_slug');
+ $old_slugs = (array) get_post_meta($post_id, '_wp_old_slug');
// if we haven't added this old slug before, add it now
if ( !count($old_slugs) || !in_array($_POST['wp-old-slug'], $old_slugs) )
diff --git a/wp-admin/export.php b/wp-admin/export.php
index 2f69320..1a49700 100644
--- a/wp-admin/export.php
+++ b/wp-admin/export.php
@@ -50,9 +50,8 @@ global $wpdb, $posts, $post;
$filename = 'wordpress.' . date('Y-m-d') . '.xml';
header('Content-Description: File Transfer');
-header('Content-Type: application/octet-stream');
header("Content-Disposition: attachment; filename=$filename");
-header('Content-type: text/wxr+xml; charset=' . get_option('blog_charset'), true);
+header('Content-type: text/xml; charset=' . get_option('blog_charset'), true);
$where = '';
if ( isset( $_GET['author'] ) && $_GET['author'] != 'all' ) {
@@ -127,12 +126,18 @@ function wxr_category_description($c) {
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. -->
<!-- It contains information about your blog's posts, comments, and categories. -->
<!-- You may use this file to transfer that content from one site to another. -->
-<!-- To import this information into a WordPress blog, -->
-<!-- 1. Log into that blog as an administrator -->
-<!-- 2. Go to Manage: Import in the blog's admin panels -->
-<!-- 3. Choose "WordPress" from the list -->
-<!-- 4. Upload this file using the form provided on that page -->
-<!-- You will be taken through the simple import procedure. -->
+<!-- This file is not intended to serve as a complete backup of your blog. -->
+
+<!-- To import this information into a WordPress blog follow these steps. -->
+<!-- 1. Log into that blog as an administrator. -->
+<!-- 2. Go to Manage: Import in the blog's admin panels. -->
+<!-- 3. Choose "WordPress" from the list. -->
+<!-- 4. Upload this file using the form provided on that page. -->
+<!-- 5. You will first be asked to map the authors in this export file to users -->
+<!-- on the blog. For each author, you may choose to map to an -->
+<!-- existing user on the blog or to create a new user -->
+<!-- 6. WordPress will then import each of the posts, comments, and categories -->
+<!-- contained in this file into your blog -->
<!-- generator="wordpress/<?php bloginfo_rss('version') ?>" created="<?php echo date('Y-m-d H:m'); ?>"-->
<rss version="2.0"
diff --git a/wp-admin/upgrade-schema.php b/wp-admin/upgrade-schema.php
index 2e2cb1a..61e1eb4 100644
--- a/wp-admin/upgrade-schema.php
+++ b/wp-admin/upgrade-schema.php
@@ -289,7 +289,6 @@ function populate_options() {
add_option('use_trackback', 0);
// 2.0
add_option('default_role', 'subscriber');
- add_option('rich_editing', 'true');
add_option('db_version', $wp_db_version);
// 2.0.1
if ( ini_get('safe_mode') ) {
@@ -310,7 +309,7 @@ function populate_options() {
add_option('show_on_front', 'posts');
// Delete unused options
- $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action');
+ $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl', 'weblogs_xml_url', 'new_users_can_blog', '_wpnonce', '_wp_http_referer', 'Update', 'action', 'rich_editing');
foreach ($unusedoptions as $option) :
delete_option($option);
endforeach;