# 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)
@@ -64,6 +64,7 @@
 			'wp.getMediaItem'		=> 'this:wp_getMediaItem',
 			'wp.getMediaLibrary'	=> 'this:wp_getMediaLibrary',
 			'wp.getPostFormats'     => 'this:wp_getPostFormats',
+                        'wp.deletePost'         => 'this:wp_deletePost',
 
 			// Blogger API
 			'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
@@ -1711,6 +1712,46 @@
 		return $formats;
 	}
 
+        /**
+         * Delete a  post
+         *
+         * @uses wp_delete_post()
+         * @param array $args Method parameters. Contains:
+         *  - int     $post_id
+         *  - string  $username
+         *  - string  $password
+         * @return array post_ids
+         */
+        function wp_deletePost( $args ) {
+
+		$this->escape( $args );
+
+		$post_ID    = (int)$args[0];
+		$username   = $args[1];
+		$password   = $args[2];
+
+		if ( ! $user = $this->login( $username, $password ) )
+			return $this->error;
+
+                do_action('xmlrpc_call', 'wp.deletePost');
+
+                $post = wp_get_single_post( $post_ID, ARRAY_A );
+                if ( empty( $post['ID'] ) )
+                        return new IXR_Error( 404, __( 'Invalid post ID.' ) );
+
+                $post_type = get_post_type_object( $post['post_type'] );
+                if( ! current_user_can( $post_type->cap->delete_post, $post_ID ) )
+                        return new IXR_Error( 401, __( 'Sorry, you are not allowed to delete this post.' ));
+
+		$result = wp_delete_post( $post_ID );
+
+		if ( !$result )
+			return new IXR_Error(500, __('The post cannot be deleted.'));
+
+		return true;
+
+        }
+
 	/* Blogger API functions.
 	 * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/
 	 */

