# 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.getTerms'           => 'this:wp_getTerms',
 
 			// Blogger API
 			'blogger.getUsersBlogs' => 'this:blogger_getUsersBlogs',
@@ -1702,6 +1703,50 @@
 		return $formats;
 	}
 
+        /**
+         * Retrieve terms
+         *
+         * @uses get_terms()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - array   $content_struct contains:
+         *      - 'taxonomy'
+         * @return array terms
+         */
+        function wp_getTerms($args) {
+
+		$this->escape( $args );
+
+                $blog_ID            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+                $content_struct     = $args[3];
+
+		if ( ! $user = $this->login( $username, $password ) )
+			return $this->error;
+
+                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
+
+                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
+
+                if( ! current_user_can( $taxonomy->cap->assign_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy' ) );
+
+                $terms = get_terms( $content_struct['taxonomy'] , array('get' => 'all') );
+
+                if ( is_wp_error( $terms ) )
+                            return new IXR_Error(500, $term->get_error_message());
+
+                if ( ! $terms )
+                            return new IXR_Error(500, __('The term ID does not exists'));
+
+                return $terms;
+
+        }
+        
 	/* Blogger API functions.
 	 * specs on http://plant.blogger.com/api and http://groups.yahoo.com/group/bloggerDev/
 	 */
