summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-11-24 17:04:14 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-11-24 17:04:14 +0000
commitf3f3886b6ce0f9cdf2a663c450a1ddb8593bd799 (patch)
treee4ec667aae78a662485b750905182bf3d39c19ad
parent23f67568a169dd05954b92d198923850709baae3 (diff)
downloadwordpress-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
-rw-r--r--wp-admin/css/press-this-ie.css14
-rw-r--r--wp-admin/users.php1
-rw-r--r--wp-includes/feed.php12
-rw-r--r--wp-includes/post.php8
-rw-r--r--wp-includes/widgets.php8
-rw-r--r--wp-login.php2
-rw-r--r--wp-settings.php2
-rw-r--r--xmlrpc.php4
8 files changed, 34 insertions, 17 deletions
diff --git a/wp-admin/css/press-this-ie.css b/wp-admin/css/press-this-ie.css
index 2e2282a..e9667c1 100644
--- a/wp-admin/css/press-this-ie.css
+++ b/wp-admin/css/press-this-ie.css
@@ -1,7 +1,7 @@
-#posting {
- position: static !important;
-}
- .ui-tabs-nav {
- margin-left: 0;
- border: 0 !important;
-}
+#posting {
+ position: static !important;
+}
+ .ui-tabs-nav {
+ margin-left: 0;
+ border: 0 !important;
+}
diff --git a/wp-admin/users.php b/wp-admin/users.php
index 0321cce..2fff69f 100644
--- a/wp-admin/users.php
+++ b/wp-admin/users.php
@@ -128,6 +128,7 @@ case 'delete':
<?php
$go_delete = false;
foreach ( (array) $userids as $id ) {
+ $id = (int) $id;
$user = new WP_User($id);
if ( $id == $current_user->ID ) {
echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n";
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>';
diff --git a/wp-login.php b/wp-login.php
index 8116267..c958599 100644
--- a/wp-login.php
+++ b/wp-login.php
@@ -420,6 +420,8 @@ default:
$user = wp_signon('', $secure_cookie);
+ $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user);
+
if ( !is_wp_error($user) ) {
// If the user can't edit posts, send them to their profile.
if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
diff --git a/wp-settings.php b/wp-settings.php
index 4a7d98c..0d25991 100644
--- a/wp-settings.php
+++ b/wp-settings.php
@@ -295,7 +295,7 @@ if ( !defined('WP_CONTENT_URL') )
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
require_once( ABSPATH . WPINC . '/wpmu-functions.php' );
-require (ABSPATH . WPINC . '/wpmu-default-filters.php'); // WPmu Filters
+require( ABSPATH . WPINC . '/wpmu-default-filters.php' ); // WPmu Filters
/**
* Allows for the plugins directory to be moved from the default location.
diff --git a/xmlrpc.php b/xmlrpc.php
index 9495b7e..ed191b5 100644
--- a/xmlrpc.php
+++ b/xmlrpc.php
@@ -1340,7 +1340,7 @@ class wp_xmlrpc_server extends IXR_Server {
$actual_post = wp_get_single_post($post_ID,ARRAY_A);
- if (!$actual_post) {
+ if (!$actual_post || $actual_post['post_type'] != 'post') {
return new IXR_Error(404, __('Sorry, no such post.'));
}
@@ -2363,7 +2363,7 @@ class wp_xmlrpc_server extends IXR_Server {
$actual_post = wp_get_single_post($post_ID, ARRAY_A);
- if (!$actual_post) {
+ if (!$actual_post || $actual_post['post_type'] != 'post') {
return new IXR_Error(404, __('Sorry, no such post.'));
}