# 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)
@@ -1737,6 +1737,14 @@
 		if ( isset($struct['post_id']) )
 			$post_id = absint($struct['post_id']);
 
+                $post_type = '';
+		if ( isset($struct['post_type']) ) {
+                        $post_type_object = get_post_type_object( $struct['post_type'] );
+                        if ( ! ( (bool) $post_type_object ) )
+                                return new IXR_Error( 403, __( 'Invalid post type' ) );
+                        $post_type = $struct['post_type'];
+                }
+
 		$offset = 0;
 		if ( isset($struct['offset']) )
 			$offset = absint($struct['offset']);
@@ -1745,7 +1753,7 @@
 		if ( isset($struct['number']) )
 			$number = absint($struct['number']);
 
-		$comments = get_comments( array('status' => $status, 'post_id' => $post_id, 'offset' => $offset, 'number' => $number ) );
+		$comments = get_comments( array('status' => $status, 'post_id' => $post_id, 'offset' => $offset, 'number' => $number, 'post_type' => $post_type ) );
 		$num_comments = count($comments);
 
 		if ( ! $num_comments )
