diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-11-24 17:04:14 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-11-24 17:04:14 +0000 |
commit | f3f3886b6ce0f9cdf2a663c450a1ddb8593bd799 (patch) | |
tree | e4ec667aae78a662485b750905182bf3d39c19ad /wp-includes | |
parent | 23f67568a169dd05954b92d198923850709baae3 (diff) | |
download | wordpress-mu-f3f3886b6ce0f9cdf2a663c450a1ddb8593bd799.tar.gz wordpress-mu-f3f3886b6ce0f9cdf2a663c450a1ddb8593bd799.tar.xz wordpress-mu-f3f3886b6ce0f9cdf2a663c450a1ddb8593bd799.zip |
WP Merge with revision 9860
git-svn-id: http://svn.automattic.com/wordpress-mu/branches/2.6@1542 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes')
-rw-r--r-- | wp-includes/feed.php | 12 | ||||
-rw-r--r-- | wp-includes/post.php | 8 | ||||
-rw-r--r-- | wp-includes/widgets.php | 8 |
3 files changed, 21 insertions, 7 deletions
diff --git a/wp-includes/feed.php b/wp-includes/feed.php index 3ff5b9a..7b3138e 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -495,10 +495,14 @@ function prep_atom_text_construct($data) { * @since 2.5 */ function self_link() { - echo 'http' - . ( $_SERVER['https'] == 'on' ? 's' : '' ) . '://' - . $_SERVER['HTTP_HOST'] - . wp_specialchars(stripslashes($_SERVER['REQUEST_URI']), 1); + $host = @parse_url(get_option('home')); + $host = $host['host']; + echo clean_url( + 'http' + . ( (isset($_SERVER['https']) && $_SERVER['https'] == 'on') ? 's' : '' ) . '://' + . $host + . stripslashes($_SERVER['REQUEST_URI']) + ); } ?> diff --git a/wp-includes/post.php b/wp-includes/post.php index 54ce668..0a580f9 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -549,7 +549,9 @@ function add_post_meta($post_id, $meta_key, $meta_value, $unique = false) { function delete_post_meta($post_id, $key, $value = '') { global $wpdb; - $post_id = absint( $post_id ); + // make sure meta is added to the post, not a revision + if ( $the_post = wp_is_post_revision($post_id) ) + $post_id = $the_post; // expected_slashed ($key, $value) $key = stripslashes( $key ); @@ -630,6 +632,10 @@ function get_post_meta($post_id, $key, $single = false) { function update_post_meta($post_id, $meta_key, $meta_value, $prev_value = '') { global $wpdb; + // make sure meta is added to the post, not a revision + if ( $the_post = wp_is_post_revision($post_id) ) + $post_id = $the_post; + // expected_slashed ($meta_key) $meta_key = stripslashes($meta_key); diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index 2a71a02..73e1f6e 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -1162,8 +1162,12 @@ function wp_widget_rss_output( $rss, $args = array() ) { $author = ' <cite>' . wp_specialchars( strip_tags( $item['author_name'] ) ) . '</cite>'; } - echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>"; - } + if ( $link == '' ) { + echo "<li>$title{$date}{$summary}{$author}</li>"; + } else { + echo "<li><a class='rsswidget' href='$link' title='$desc'>$title</a>{$date}{$summary}{$author}</li>"; + } +} echo '</ul>'; } else { echo '<ul><li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li></ul>'; |