From 359ec6f7109409ea4398b0b30f09a78ef2dac6e8 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 7 Mar 2006 16:17:35 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@538 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/admin-functions.php | 19 +++++++++++------ wp-inst/wp-admin/admin.php | 2 +- wp-inst/wp-admin/moderation.php | 2 +- wp-inst/wp-admin/post-new.php | 6 +++--- wp-inst/wp-admin/post.php | 9 ++++++-- wp-inst/wp-admin/user-edit.php | 2 ++ wp-inst/wp-includes/classes.php | 3 +-- wp-inst/wp-includes/kses.php | 40 ++++++++++++++++++++++++++++-------- wp-inst/wp-register.php | 13 +++++++----- wp-inst/wp-settings.php | 1 - wp-inst/wpmu-settings.php.dist | 2 +- 11 files changed, 69 insertions(+), 30 deletions(-) (limited to 'wp-inst') diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php index aabf77e..b33f94e 100644 --- a/wp-inst/wp-admin/admin-functions.php +++ b/wp-inst/wp-admin/admin-functions.php @@ -105,12 +105,12 @@ function relocate_children($old_ID, $new_ID) { function fix_attachment_links($post_ID) { global $wp_rewrite; - $post = & get_post($post_ID); + $post = & get_post($post_ID, ARRAY_A); $search = "#]+rel=('|\")[^'\"]*attachment[^>]*>#ie"; // See if we have any rel="attachment" links - if ( 0 == preg_match_all($search, $post->post_content, $anchor_matches, PREG_PATTERN_ORDER) ) + if ( 0 == preg_match_all($search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER) ) return; $i = 0; @@ -122,9 +122,11 @@ function fix_attachment_links($post_ID) { $id = $id_matches[2]; // While we have the attachment ID, let's adopt any orphans. - $attachment = & get_post($id); - if ( ! is_object(get_post($attachment->post_parent)) ) { - $attachment->post_parent = $post_ID; + $attachment = & get_post($id, ARRAY_A); + if ( ! empty($attachment) && ! is_object(get_post($attachment['post_parent'])) ) { + $attachment['post_parent'] = $post_ID; + // Escape data pulled from DB. + $attachment = add_magic_quotes($attachment); wp_update_post($attachment); } @@ -133,7 +135,10 @@ function fix_attachment_links($post_ID) { ++$i; } - $post->post_content = str_replace($post_search, $post_replace, $post->post_content); + $post['post_content'] = str_replace($post_search, $post_replace, $post['post_content']); + + // Escape data pulled from DB. + $post = add_magic_quotes($post); return wp_update_post($post); } @@ -491,6 +496,8 @@ function get_default_link_to_edit() { else $link->link_name = ''; + $link->link_visible = 'Y'; + return $link; } diff --git a/wp-inst/wp-admin/admin.php b/wp-inst/wp-admin/admin.php index 37894ca..4cedbbe 100644 --- a/wp-inst/wp-admin/admin.php +++ b/wp-inst/wp-admin/admin.php @@ -61,7 +61,7 @@ if (isset($_GET['page'])) { } if (! file_exists(ABSPATH . "wp-content/plugins/$plugin_page") && ! file_exists(ABSPATH . "wp-content/mu-plugins/$plugin_page")) - die(sprintf(__('Cannot load %s.'), $plugin_page)); + die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); if (! isset($_GET['noheader'])) require_once(ABSPATH . '/wp-admin/admin-header.php'); diff --git a/wp-inst/wp-admin/moderation.php b/wp-inst/wp-admin/moderation.php index 9166536..c684f6e 100644 --- a/wp-inst/wp-admin/moderation.php +++ b/wp-inst/wp-admin/moderation.php @@ -145,7 +145,7 @@ $i = 0;

comment_author_email) { ?>| comment_author_url && 'http://' != $comment->comment_author_url) { ?> | | |

comment_ID.'">' . __('Edit') . ' | ';?> +echo '' . __('Edit') . ' | ';?> | comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), wp_specialchars($comment->comment_author, 1)) . "' );\">" . __('Delete just this comment') . " | "; ?> diff --git a/wp-inst/wp-admin/post-new.php b/wp-inst/wp-admin/post-new.php index b0dc1b6..76713cd 100644 --- a/wp-inst/wp-admin/post-new.php +++ b/wp-inst/wp-admin/post-new.php @@ -58,11 +58,11 @@ include('edit-form-advanced.php'); - + - +