# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: C:\xampp\htdocs\wordtrunk\wp-includes
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: class-wp-xmlrpc-server.php
--- class-wp-xmlrpc-server.php Base (BASE)
+++ class-wp-xmlrpc-server.php Locally Modified (Based On LOCAL)
@@ -785,13 +785,23 @@
 			case 'pending':
 				break;
 			case 'private':
+                                if ( $update ) {
+                                        if ( ! current_user_can( $post_type->cap->publish_post, $post_data[ 'ID' ] ) )
+                                                return new IXR_Error( 401, __( 'Sorry, you are not allowed to set this post as private.' ) );
+                                } else {
 				if ( ! current_user_can( $post_type->cap->publish_posts ) )
 					return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ));
+                                }
 				break;
 			case 'publish':
 			case 'future':
+                                if ( $update ) {
+                                        if ( ! current_user_can( $post_type->cap->publish_post, $post_data[ 'ID' ] ) )
+                                                return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish this post.' ) );
+                                } else {
 				if ( ! current_user_can( $post_type->cap->publish_posts ) )
 					return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ));
+                                }
 				break;
 			default:
 				$post_data['post_status'] = 'draft';
