# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /var/www/GSoC/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.getPostTerms'       => 'this:wp_getPostTerms',
 
 			// Blogger API
 			'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
@@ -1702,6 +1703,49 @@
 		return $formats;
 	}
 
+        /**
+         * Retrieve post terms
+         *
+         * @uses wp_get_object_terms()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - int     $post_id
+         * @return array term data
+         */
+        function wp_getPostTerms( $args ) {
+
+		$this->escape( $args );
+
+                $blog_ID            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+                $post_ID            = (int) $args[3];
+
+		if ( ! $user = $this->login( $username, $password ) )
+			return $this->error;
+
+                $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->edit_post , $post_ID ) )
+                        return new IXR_Error( 401, __( 'Sorry, You are not allowed to edit this post.' ));
+
+                $taxonomies = get_taxonomies( '' );
+
+                $terms = wp_get_object_terms( $post_ID , $taxonomies );
+
+                if ( is_wp_error( $terms ) )
+                        return new IXR_Error( 500 , $term->get_error_message());
+
+                return $terms;
+                
+        }
+
 	/* Blogger API functions.
 	 * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/
 	 */
